rstudio / flexdashboard

Easy interactive dashboards for R
https://pkgs.rstudio.com/flexdashboard/
Other
812 stars 301 forks source link

How can I have both the drop down and the icon for my page? #105

Closed aditya-kothari closed 3 years ago

aditya-kothari commented 7 years ago

Hi All,

I am wondering if someone can help me use multiple parameters for Pages on flexdashboard.

for example, to declare a new page we use the below code:

NewPage

=========================

now within this page we have option to declare page parameters like orientation, navmenu (for drop downs), page icons etc. But I am unable to use both.

for example the below code doesn't work:

NewPage {data-navmenu="Menu A"} {data-icon="fa-list"}

=============================

How can I have both the drop down and the icon for my page?

jjallaire commented 7 years ago

You would do it this way:

NewPage {data-navmenu="Menu A" data-icon="fa-list"}
aditya-kothari commented 7 years ago

Hi,

Thanks for the quick response but doing this is inserting icons for the pages that are in the drop down. I need the icon for "Menu A" and not "New Page" or "Page 1" , "Page2" as per below. See below snapshot:

capture

And here is the sample code used. (I apologize if I wasn't clear in the first place)


title: "Page Navigation Menus" output: flexdashboard::flex_dashboard


Page 1 {data-navmenu="Menu A" data-icon="fa-list"}

=====================================

Page 2 {data-navmenu="Menu A" data-icon="fa-list"}

=====================================

Page 3 {data-navmenu="Menu B"}

=====================================

Page 4 {data-navmenu="Menu B"}

=====================================

jjallaire commented 7 years ago

Sorry about that, there is actually no way currently to set an icon for the menu.

aditya-kothari commented 7 years ago

No problem. BTW is there a new version of flexdashboard releasing anytime in the future?

jjallaire commented 7 years ago

It looks like the are a couple of bugs fixed on master that we don't yet have on CRAN so we'll do a release for those soon. Is there anything else you are looking for in a new release?

aditya-kothari commented 7 years ago

If you would be able to add the below to the newest release that would be great:

Thanks a lot for asking! :)

jjallaire commented 7 years ago

Those features aren't likely to make it into flexdashboard soon (all good ideas of course) mostly because they are well covered by shinydashboard (which in general provides much higher fidelity control over UI at the expense of some additional code).

dsaada commented 4 years ago

hello,

any update on this?

cpsievert commented 3 years ago

Seems this is a duplicate of https://github.com/rstudio/flexdashboard/issues/88

AnotherDataGuy commented 3 years ago

A workaround for this issue might be adding Unicode icons to the data-navmenu :

Page 1 {data-navmenu="🕮 Menu A" data-icon="fa-list"}

=====================================

Page 2 {data-navmenu="🕮 Menu A" data-icon="fa-list"}

=====================================

Page 3 {data-navmenu="� Menu B"}

=====================================

Page 4 {data-navmenu="� Menu B"}

=====================================

See https://www.utf8icons.com/ for a complete list