..:: SoSoVN Documents
SoSo Document Builder - Copyright © 2005-2008 by SoSoVN.com 
« Previous    Next »
Loops and loop variables


+ The root template loop begins with codes "<!-- START: blockname -->" and ends with codes "<!-- END: blockname -->". The variable of loop has struture like "{blockname:VAR_NAME}". For example:

<!-- START: articlerow -->
{articlerow:TITLE}<br><span class="date">{articlerow:DATE}</span><br>
{articlerow:THUMB_SMALL} {articlerow:PREVIEW}<br><br>
<!-- END: articlerow -->



+ The sub template loop begins with codes "<!-- START: parent_blockname:blockname -->" and ends with codes "<!-- END: parent_blockname:blockname -->".

<!-- START: menucatrow -->
{menucatrow:NAME}
       <!-- START: menucatrow:subcatrow -->
       + {menucatrow:subcatrow:NAME}
       <!-- END: menucatrow:subcatrow -->

<!-- END: menucatrow -->


+ The If condition begins with codes "<!-- START IF: blockname -->" and ends with codes "<!-- END IF: blockname -->".
Sometimes we need use the if condition to control the template and display the best results. For example:

<!-- START IF: articlerow -->
     <!-- START: articlerow -->

     {articlerow:TITLE}<br><span class="date">{articlerow:DATE}</span><br>
     {articlerow:THUMB_SMALL} {articlerow:PREVIEW}<br><br>
     <!-- END: articlerow -->
<!-- END IF: articlerow -->

<!-- START NOIF: articlerow -->
      There is not any article.
<!-- END NOIF: articlerow -->

« Previous    Next »