If you want to include HTML content from another file in the layout, just use the includeHTML() function. for example
shinyUI(fluidPage( titlePanel("Included Content"), mainPanel( includeHTML("include.html") ) ))
should be minimally sufficient for how the contents of "include.html" on a particular page. If you need to make it more dynamic, you can use
# ----- ui.R ----- shinyUI(fluidPage( titlePanel("Uploading Files"), mainPanel( htmlOutput("inc") ) )) # ----- server.R ----- shinyServer(function(input, output) { getPage<-function() { return(includeHTML("include.html")) } output$inc<-renderUI({getPage()}) })
And you can use any logic you want to specify the name of the file you want to load.
Mrflick
source share