0

Using quarto, I'd like to do something like:

---
params:
show_private_info: true
---

::: {.content-visible <ARGUMENT TESTING FOR `params$show_private_info`>}
Some private information
:::

Is that feasible?

Clearly something can be whipped up using an asis (r) code block cating out the markdown, with eval dependent on params$show_private_info, but I'd like to avoid that detour if possible ...

balin
  • 1,554
  • 1
  • 12
  • 26

1 Answers1

0

Answered here as follows:

`r if (params$show_private_info) "::: {.content-hidden}"`

Some private information

`r if (params$show_private_info) ":::"`

with the additional recommendation to explicitly solve this by use of actual profiles instead.

balin
  • 1,554
  • 1
  • 12
  • 26