Ryan Kent
Well-known member
I really wish there was a XenTemplates 101 user guide so I could read it and learn. Since there is not, I will do my best to learn it the hard way.
My initial question concerns "content" code. Using the below code as an example, my questions are:
- where does the "hascontent" portion of xen:if hascontent="true" come from? Is it a variable?
- where does the <xen:contentcheck> come from?
I basically seek to understand this code and how it works. I am totally lost on these seemingly simple points.
My initial question concerns "content" code. Using the below code as an example, my questions are:
- where does the "hascontent" portion of xen:if hascontent="true" come from? Is it a variable?
- where does the <xen:contentcheck> come from?
I basically seek to understand this code and how it works. I am totally lost on these seemingly simple points.
Code:
<xen:if hascontent="true">
<ul>
<xen:contentcheck>
<xen:foreach loop="$StatusUpdates" value="$update">
<li>
<xen:avatar user="$update" size="s" img="true" />
<a href="{xen:link members, $update}" class="username" style="display: inline;">{xen:helper richUserName, $update}</a>
<span class="userTitle">{$update.message} (<xen:datetime time="$update.post_date" />)</span>
</li>
</xen:foreach>
</xen:contentcheck>
</ul>
</xen:if>