im trying to use more embedded templates so i dont have to repeat almost identical code across a dozen templates. the only difference in the code is the value of “number” (my cat id)
template: articles/travel-books:
{assign_variable:number="220"}
{embed="includes/article-organiser"}
template: includes/article-organiser:
{if segment_3 == ""}
{embed="includes/category-select" cat_id="{number}"}
{/if}should this work? it seems the value i assign to my own variable (220) isnt getting carried over in to article-organiser. if i substitute cat_id=”{number}” with cat_id=“220”, it works fine.
am i using global variables wrongly?