Page 1 of 1

Smarty in Template page vars

Posted: Tue Aug 26, 2008 10:09 am
by Chris
Hi All,

I use the webshop module (esshop) and I want to set a differtent for every category. There are 2 cats at the moment so I wanted to do this in the Main Template with Smarty.

But this doesn't work

{if page eq Webshop}
  {if CategoryID eq 1)
    Something
  {else}
    Something else
  {/if}
{else}
  {sitename} - {title}
{/if}

Is there a way I van findout which vars are known by smarty when parsing the template?

Re: Smarty in Template page vars

Posted: Tue Aug 26, 2008 10:16 am
by cyberman
Chris wrote: {if page eq Webshop}
  {if $CategoryID eq 1)
      Something
  {else}
      Something else
  {/if}
{else}
  {sitename} - {title}
{/if}
Every variable should have the sign "$" at first 8).
Is there a way I van findout which vars are known by smarty when parsing the template?
Use {get_template_vars} tag ;) ... attention, the results of this tag are without $.