Removing CSS Tags

Hi Everyone,
I edited the title section of my shinydashboard to include a logo. It works as intended. Just that the CSS Tags appear on the header of a Webpage. I would like to get rid of the Tags from appearing on any webbrowser.

Thanks

library(shiny)
library(shinydashboard)
library(shinythemes)
library(shinyWidgets)
library(shinyalert)
library(DT)
library(magrittr)
library(readxl)
library(shinyWidgets)
library(shinybusy)
library(readr)
library(shinyjs)

AllContractors <-  read_csv("Dashboard_Receipes/Contractors_Final.csv", na = "empty")


ui <- dashboardPage(
dashboardHeader(  title = tags$a(href='https:\\example.com',
(tags$img(src='NNN.png', width= 250, height = 40)),titleWidth = 400)),

dashboardSidebar(prettyCheckboxGroup(inputId = "checkgroup5",
selected = "ALL CONTRACTORS", label = 'AD INVENTORY', choices = (list('ALL CONTRACTORS')),




dashboardbody(

fluidRow(
infoBoxOutput("ad_data1", width = 6),
infoBoxOutput("ad_data2", width = 6)
),
column(width = 12,
box(
add_busy_spinner(spin = "fading-circle"),
addSpinner(dataTableOutput('Data1'), spin = "cube-grid", color = "#8B0000"), height = 700, width = 13
),
)



server <- function(input, output, session) {

datasourceinput <- reactive({
if(input$checkgroup5 == 'ALL CONTRACTORS'){
DT::datatable(AllContractors)
}


})


output$Data1 <- renderDataTable({
datasourceinput()
})
}


shinyApp(ui, server)


try nesting your title html inside of a top lebel tags$li object

#not
 title = tags$a(

#but 
 title = tags$li(tags$a(  ...yourcode...      )  # extra bracket to close at the end

Thanks.

I got this error:

Error in tag$li : object of type 'closure' is not subsettable

tags$li not tag$li
you dropped the s ?

Same.

I think since I am masking items in what was meant to be the title section. It renders whatever is in that division to the webpage.

I know shiny as a function called windowTitle. I am not sure if there is an equivalent for ShinyDashboard.

You can't use html in the <title> of a web page. The documentation for dashboardHeader() says:

An optional title to show in the header bar.. By default, this will also be used as the title shown in the browser's title bar. If you want that to be different from the text in the dashboard header bar, set the title in dashboardPage .

So I'd suggest trying that.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.