by Before Semicolon

Local Context Data

Every page template is its own context. Any additional data created inside the template is inherited by any included partial markup.

You can create variables which value can only be accessed after declaration and inside the tag it was declared at.

<main>
	<!-- cant access "page" before declaration -->
	<variable name="page" value="$data.pages.documentation"></variable>
	<h3>{page.title}</h3>
	<p>{page.description}</p>
</main>
<!-- cant access "page" outside
the tag it was declared at -->

Variables declared at the beginning of the template is available everywhere inside the template, even inside the partials you include in your template.

<variable name="page" value="$data.pages.documentation"></variable>
<main>
	<h3>{page.title}</h3>
	<p>{page.description}</p>
	<!-- page can be referenced
	inside the "products" partial template -->
	<include partial="products"></include>
</main>