1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Make $contentTemplate available in all templates

Discussion in 'Closed Suggestions' started by Floren, Mar 23, 2012.

  1. Floren

    Floren Well-Known Member

    I recently wanted to use a conditional that filters what is displayed in a template based on the page viewed. For example, I cannot use $contentTemplate in 'node_forum_level_2' template:
    Code:
    <xen:if is="{$contentTemplate} == 'forum_list'">
    Do some stuff
    </xen:if>
    it eval's to an empty string. Adding a variable to $node would be the most elegant solution, so we can call it with:
    Code:
    <xen:if is="{$forum.contentTemplate} == 'forum_list'">
    Do some stuff
    </xen:if>
    Thanks for adding this, much appreciated.
     

Share This Page