I am creating Shiny app with multiple landing pages some of them need to be connected. The sample here shows that in the home page, the select input "home" is selected and in the dashboard body two widgets the 1st one is "clients" with action button "click here". I need this button to lead to the same landing page if i selected "Clients" from the SelectInput Or should I create a link to facilitate jumping to any page Here is a GIF showing what I'm looking for
the used code
library(shiny)
library(shinydashboardPlus)
library(DT)
library(readxl)
library(dplyr)
library(formattable)
library(shinydashboard)
library(shinyjqui)
library(shinyjs)
library(shinythemes)
library(markdown)
title <- tags$a(href= NULL, tags$img(src ="BM_fl.png", onclick = "selectInput('Home')", height = '55', style = "padding-bottom:10px;"))
ui = fluidPage(theme=shinytheme("superhero"),
dashboardPage(
dashboardHeader(title = title, titleWidth = 230),
dashboardSidebar(selectInput("listofitems","Items List",c("Home","Group","Clients"), selected = "Home")),
dashboardBody(uiOutput("ui_myHome"),
uiOutput("ui_myclients"))))
shinyServer(function(input, output, session) {
output$ui_myHome<-renderUI({if (input$listofitems == 'Home'){(
fluidPage(
widgetUserBox(
title = "Clients",
shiny::actionButton(inputId='clientsmainbutton', label="Click here"),
type = 2, src = "https://adminlte.io/themes/AdminLTE/dist/img/user7-128x128.jpg", color = "yellow"),
widgetUserBox(
title = "Facts",
shiny::actionButton(inputId='ab1', label="Click here"),
type = 2, src = "https://adminlte.io/themes/AdminLTE/dist/img/user7-128x128.jpg", color = "yellow")))}
else if (input$listofitems == 'Clients'){(Clientsbutton<- fluidPage(
widgetUserBox(title = "Global",shiny::actionButton(inputId='ab1', label="Click here"),
type = 2, src = "https://adminlte.io/themes/AdminLTE/dist/img/user7-128x128.jpg",
color = "red")))}})})