XF 1.4 Including templates, if they exist, based on variable names.

Jawsh

Active member
I would like to include a template before and after every node and category if they exist.

- include category_before_{$node.id}
- include category
- - include node_before_{$node.id}
- - include node
- - include node_after_{$node.id}
- include category_after_{$node.id}

So, unless (for instance) catagory_after_32 exists, it does nothing.
But if it does exist, go on to include its content.

Is this possible? Is there a better way to do this task?
 
Would it be easier to create a conditional statement?
Code:
<xen:if is="{$forum.node_id}">
          <xen:include template="template_name" />
</xen:if>
 
Top Bottom