Developer guide     >     Developing Templates     >     Examples

Rendering content

  1. <!-- contentarea begin: name_of_contentarea -->
  2. <!-- contentarea accepts: link, headline, text, feature, bottomtext -->
  3. {foreach from=$contentareas.name_of_contentarea.CBLOCKS item=cbs}
  4.     {foreach from=$cbs.ENTRYMASKS item=entrymask}
  5.        
  6.         {if $entrymask.CODE == "feature"}
  7.             {if ($entrymask.FORMFIELDS.link.URL != "")}<a href="{$entrymask.FORMFIELDS.link.URL}">{/if}
  8.                 <div class="col{$entrymask.FORMFIELDS.columns.VALUE} {$entrymask.FORMFIELDS.color.VALUE}">
  9.                 <h2>{$entrymask.FORMFIELDS.headline.VALUE}</h2>
  10.                 <div>{$entrymask.FORMFIELDS.text.VALUE}</div>
  11.             {if ($entrymask.FORMFIELDS.link.URL != "")}</a>{/if}
  12.         {/if}
  13.  
  14.         {if $entrymask.CODE == "text"}
  15.             {$entrymask.FORMFIELDS.content.VALUE}
  16.         {/if}
  17.  
  18.         {if $entrymask.CODE == "link"}
  19.             <a href="{$entrymask.FORMFIELDS.link.URL}" class="big">{$entrymask.FORMFIELDS.title.VALUE}</a><br>
  20.         {/if}
  21.  
  22.     {/foreach}
  23. {/foreach}
  24. <!-- contentarea end: name_of_contentarea -->