Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flexdashboard multiple attributes page

I'm learning flexdashboard and trying some different lay-outs for a future app. But I'm having trouble assigning different attributes for the same page.

I want the second page to have a row lay-out, be listed in nav-bar A and have an icon in front of the title. When I write them like this: {data-orientation=rows, data-navmenu="Menu A", data-icon="fa-list"} none of them is used. When written like this: {data-orientation=rows}, {data-navmenu="Menu A"}, {data-icon="fa-list"} only the last one is executed and the first two are put in the page-title. When using the second one without commas, the same thing happens.

I haven't found any examples of muliple attributes for a page in the examples.

How do I combine them? It must be possible as I can't imagine I have to chose between giving my page a row-format and putting it in a drop-down menu...

This is the code I used:


title: "My flexdash"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
runtime: shiny
---

```{r setup, include=FALSE}
library(flexdashboard)
```

Page 1 {data-navmenu="Menu A"}
======================================    
Column {data-width=350}
-----------------------------------------------------------------------
### Chart A
```{r}

```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart B
```{r}

```
# need these attributes to be working but invisible
Page 2 {data-orientation=rows}, {data-navmenu="Menu A"}, {data-icon="fa-list"}
=============================================   
Row {data-width=650}
-----------------------------------------------------------------------   
### Chart C 
```{r}

```
Row {data-width=350}
-----------------------------------------------------------------------
### Chart D
```{r}

```
like image 902
Tingolfin Avatar asked Dec 08 '17 10:12

Tingolfin


2 Answers

Found the answer: I only had to separate them by a space...

Page 2 {data-orientation=rows data-navmenu="Menu A" data-icon="fa-list"}
like image 53
Tingolfin Avatar answered Sep 21 '22 14:09

Tingolfin


Thanks - I didn't have the same problem (dropdown + storyboard) but your rmd snippet was just what I needed to solve the problem! That is, just keeping the two layouts parallel instead of shoehorning one layout into another.

Responsable Conception Produit {data-navmenu="Competences par Métier"}
=========================================
<br>
<br>


```{r echo=FALSE, message=FALSE, warning=FALSE, results='asis'}
# Responsable Conception Produit 

...

```

like image 23
Cormac O'Keeffe Avatar answered Sep 23 '22 14:09

Cormac O'Keeffe