faq.Rd
Generate a widget that displays FAQs in an information/about section of an app.
faq(faqlist, id, format = "bscollapse", bscollapse_args = list(id = "faq", open = NULL, multiple = FALSE))
faqlist | a prepared list of FAQs. See details. |
---|---|
id | character, the id for the |
format | character, |
bscollapse_args | a list of arguments passed to bsCollapse. Defaults to |
a shinyBS::bsCollapse
object or a list.
faq
creates an FAQ widget from a named list.
It returns a Bootstrap Collapse menu FAQ format by default. Changing to format = "list"
simply passes through the original faqlist
.
Generally, an FAQ list is a named list that is prepared in advance and passed to faqlist
.
The names of the list elements are used for indexing the list with id
.
It is designed this way in the context of reusable FAQ list dictionaries, where each use does not require all entries.
Each list element in faqlist
is a length-2 list.
The first element is the question: a character string. The second element
is the answer: any text or HTML content, e.g., multiple tags wrapped in a tag list.
A key difference with the open
argument that can be passed in a list to bscollapse_args
is that it must simply match a single dictionary entry id
(e.g., open = "apps"
),
not a collapse panel question title or id.
#not run