Templating Language


Sitecast Cloud Builder uses Liquid templating to pull data from the Content Hub. Filters are also supported to configure the page with the right type of items stored into the database. e.g. jsonify, markdownify, etc.

From the builder, we have created a dynamic documentation you can use as reference.

As a generic use of Liquid Templating here are the definitions with objects, tags, and filters.

Objects tell Liquid where to show content on a page. Objects and variable names are denoted by double curly braces: {{ ... }}. "

For example, when attaching a block to a screen,

{{blocks.doc_detail.body }}  

Tags create the logic and control flow for templates. They are denoted by curly braces and percent signs: {% and %}.

{% if current_resource.slug == 'about' %} 
{{ blocks.about.body }}  
{% elsif current_resource.slug == 'contact' %}  
{{ blocks.contact.body }}  
{% endif %}  

Filters change the output of a Liquid object. They are used within an output and are separated by a pipe "|".

As an example, to use the markdownify filter to render a document as a markdown file,
{{ current_item.contents.body | markdownify }}