I always use cgsimple smarty to show different template-layouts in one project. I like to use only one template .
In this case I have a one-column-content-area for all pages instead of the startpage: there will be shown some news-teasers in a second small div and the main content-div should have a smaller width too ...
... but only when there are some news to be displayed. When there a no news to be shown, the larger one column-div should be displayed as in all other pages.
I tried out with capture:
Code: Select all
{if $cgsimple->get_root_alias() == 'home' }
{capture assign=actual}
{news}
{/capture}
{if $actual != ''}
show two smaller divs, one with {contnet}, one with {news}
{/if}
{else}
show only one bigger div and no news
{/if}
Any hints? Please forgive - I am still in the "trial and error"-period in smarty coding.
---