Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrong title in the browser tab R Shiny

I am getting my title in the browsers tab to be named the following:

    <div> <img src="pd_logo.jpg" align="left"/> Model </div>

It is caused by the following code

    shinyUI(navbarPage(title=(div(img(src="logo.jpg", align = "left"), 
    " Model")), fluid = TRUE, ... ))

How to have a normal name in the browsers tab instead?

Thank you in advance.

like image 867
Martin Avatar asked Nov 01 '25 13:11

Martin


1 Answers

We can use the windowTitle variable in navbarPage along with little raw HTML

 shinyUI(navbarPage(title=(div(img(src="logo.jpg", align = "left"), 
                          " Model")), 
               ,windowTitle = HTML("<title>Model</title> <link rel='icon' type='image/gif/png' href='logo.jpg'>")
               fluid = TRUE, ... ))
like image 142
A. Suliman Avatar answered Nov 03 '25 05:11

A. Suliman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!