Can I set HubL variables at the page level?


#1

I have a template that I use for ~20 different pages. On each of these pages, there is a paragraph of shared content (global module) that I would like to customize, depending on the page used. Ex: replace {{ this_text }} with “page 1” or “page 2” or “page 3”, depending on the page where the module is used.

I am comfortable with using variables at the template level. Is there any way to do it at the page level?


#2

Hi @wmflan39,

Are you looking to store the values (“page 1”, “page 2”, etc) on the template, and only show the relevant value? You could use if statements to only show content on a certain page, like this: