Get current id style

  • Thread starter Thread starter Deleted member 10469
  • Start date Start date
D

Deleted member 10469

Guest
Hello, how get current id style inside a template please ?

Exemple :
Code:
<xen:if is="{$currentStyleId} == {$xencreaIdStyles}">
    <!-- my code.... -->

{$xencreaIdStyles} is a string of styles id => "1,6,8,9"

Thanks for help :)
 
Code:
<xen:if is="in_array({$currentStyleId}, array({$xencreaIdStyles}))">    
    <!-- my code.... -->
</xen:if>

Should work.
 
Thanks, but $currentStyleId (for example) is a non existing variable, you know how to retrieve the id of the current style please?
 
Thanks Arty, but not work :

Code:
<xen:if is="{$visitorStyle.style_id} == 3">
    <xen:include template="xencrea_header.css" />
</xen:if>

My id :
demo.xencrea.com/misc/style?style_id=3&_xfToken=1%2C1375735124%2Cecb0128c8d7dd6c932e78420b7346c2024851fa3&redirect=%2F

<xen:include template="xencrea_header.css" /> is not loaded.
 
It's good, a bad condition inside a old template.
Thanks for help :)
 
If all those styles have same parent style you can compare it to $visitorStyle.parent_id instead.
 
Back
Top Bottom