aleXela
aleXela

Reputation: 1301

Pass variable through the page in OctoberCMS

Can I pass variable through the page like this?

{% set page.price = 2 %}

and later get it

<div class="price">{{ price }}</div>

Or if there any other way to do this? Im going through the For cycle and need to set price from one of items

Upvotes: 0

Views: 485

Answers (1)

Ahmed Essam
Ahmed Essam

Reputation: 1010

You can just code:

{% set price = 2 %}

Then use it:

<div class="price">{{ price }}</div>

Upvotes: 1

Related Questions