I am currently trying to build an R shiny dashboard and i want to create parts where i link to websites and give information around them. I initially started the dashboard offline and simply ran a script making the URL a string, then used that later. I want to host it on shiny now and I cant get R to run the strings first so think i need to do it another way.
My first attempt at the dashboard is below:
dashboardHeader(title = "dashboard"),
dashboardSidebar(
sidebarMenu(
menuItem("ex1?", tabName = "ex1", icon = icon("arrow-circle-right")),
menuItem("ex2", tabName = "queries", icon = icon("envelope")),
menuItem("ex3", tabName = "QMI", icon = icon("folder-open")),
menuItem("ex4", tabName = "Newport", icon = icon("arrow-circle-right"))
)
),
dashboardBody(
tabItems(
tabItem(tabName = "Main",
h3("What we do?", tags$br(),
h4(box("text")
),
tabBox(
title = "Core publications",
id = "tabset1", height = "200px", width = 5,
tabPanel("link1", tagList(link1_url),tags$br(),"text"),
tabPanel("link2",tagList(link2_url),tags$br(), "text"),
tabPanel("link3",tagList(link3_url),tags$br(), "text3")
),
The string file has e.g.
ex1_url <- a("text", href="https://www.exampleurl.com")
So with the current code, when the dashboard is live it crashes since it doesnt have the destination for the hyperlinks, i need a way to link the background url to the text in the ui.
I feel i haven't set this up the best way so any help will be appreciated.
Thanks