Building on our earlier templating work, you can now create fully customizable templates for your resource pages.
Using variables in FQL
See the below example, where we define variables in the 'front matter' of the Markdown page (the part between the ---
lines). These variables can then be referenced in FQL by placing a %
before their name.
Note: This and the below variable features only work when embedding your FQL within the <fql>
tags.
Also, a current limitation is that the <fql>
tag can not yet be used within a <tab>
or within other html tags. A workaround for now is to put the <fql>
query in a separate file and include that in the page with the {{page}}
widget as described in this video.
New output formats for FQL: moving beyond tables
Sometimes you only have one value you want to pull from a resource and display in the page. For this we now have the output format inline
. As you can see in the first example in the above image, this will nicely display the word or paragraph within the rest of your text.
In other cases you are returning one column of values. Here you can now even choose between three different formats:
- Choose the output format
ul
for an Unordered (bulleted) list. - Choose the output format
ol
for an Ordered (numbered) list. - And finally, choose output format
inline
again, with thedelimiter
of your choice, for a comma (or otherwise) separated list.
Variables to use in your guide and template
Continuing on the 'variables' theme, we've also exposed more variables for you to use in your guide pages:
Or in your Master Template:
And the best thing is that these variables can again also be referenced by their name in FQL or directly placed within a page with the {{variable:myVariable}}
widget.