Conditional Template - Smarty and Arrays
Posted: Sun May 30, 2010 8:48 pm
I would like to conditionally hide elements in a template based on whether or not a page-alias is in a predefined array, like so...
My problem is: How and where would I best define that array?
--- addendum ---
How is working with arrays in templates not a valid topic for the development discussions board?
Code: Select all
{if (in_array($page_alias,$someArray))}
show this
{/if}
Code: Select all
$someArray=array( 'alias1', 'alias2', 'alias3','alias4' );
--- addendum ---
