stayhomer.png

Treat without the trick!

Be brave and face your Redmine fears Horribly awesome discounts wait for you!

Halloween special offer has begun!

How to use page fields and global variables?

Page fields and global variables can be used inside code of pages/parts/layouts/snippets as predefined variables:

<h1 class="title">{% page.fields['field_name']%}</h1> <!-- field from current page -->

{% pages['page_name'].fields['field_name'] %} <!-- field from 'page_name' page -->

<p>{% assign new_variable = site.variables['promotion_active'] %}</p> <!-- get global variable value... -->
<b>{{new_variable}}</b> <!-- ...and use it inside code -->
Was this article helpful? Yes  No
1590 from 1681 found this helpful