select only one category among categories
Posted: Tue Mar 27, 2012 9:40 pm
hi
In product module when I use {get_template_vars} in detail template I get categorytext= Travertine, Paver,Tile because of one product has more than one category.
what I am trying to do is something like this
{if categorytext=='Travertine'}say yes {else }no {/if}
but only I get yes when I use it like this
{if categorytext=='Travertine, Paver,Tile'} so how can I get yes only for category "Travertine".
when I use $categorytext[0] I got only "T" which is capital of Taravertine .
how can I select only "Travertine" category among three categories..
thanks all
In product module when I use {get_template_vars} in detail template I get categorytext= Travertine, Paver,Tile because of one product has more than one category.
what I am trying to do is something like this
{if categorytext=='Travertine'}say yes {else }no {/if}
but only I get yes when I use it like this
{if categorytext=='Travertine, Paver,Tile'} so how can I get yes only for category "Travertine".
when I use $categorytext[0] I got only "T" which is capital of Taravertine .
how can I select only "Travertine" category among three categories..
thanks all