I would like to have a custom URL generated in shinyapps.IO (or willing to upgrade to appropriate Enterprise tools) based on value selected by selectInput(). In the example below, if I publish to shinyapps.IO, the URL will be https://myDomain.shinyapps.io/myAppName/
I would like 5 unique URLs, based on the user-selected option from selectInput().
- https://myDomain.shinyapps.io/myAppName/Option1
- https://myDomain.shinyapps.io/myAppName/Option2
- https://myDomain.shinyapps.io/myAppName/Option3
- https://myDomain.shinyapps.io/myAppName/Option4
- https://myDomain.shinyapps.io/myAppName/Option5
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
library(tidyverse)
#################### UI ###################
ui <- dashboardPagePlus(
###### Header ####
header = dashboardHeaderPlus(
title = NULL,
titleWidth = '250',
disable = FALSE,
enable_rightsidebar = FALSE,
.list = NULL,
left_menu = tagList(
selectInput(
inputId = "options",
label = "Select an option",
choices = c('Option1', 'Option2', 'Option3', 'Option4', 'Option5'))
) #end left_menu
), #close Header
###### Sidebar ####
sidebar = dashboardSidebar(disable = TRUE),
footer = dashboardFooter(NULL),
###### Body ####
body = dashboardBody(
uiOutput('optionSelected')
) #close dashboardBody
) # closes Dashboard Page Plus
#################### SERVER ####################
server = function(input, output, session) {
output$optionSelected <- renderUI({
input$options
}
)
}
shinyApp(ui = ui, server = server)
I have read about 'Vanity URLs' at Vanity URLs with Connect via deployApp, but this does not quite seem like the solution that I am seeking.
Thank for any advice.