Very simple Show sidebar content. Or not.

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Locked
janaf
Forum Members
Forum Members
Posts: 183
Joined: Sun Jan 10, 2010 7:02 pm

Very simple Show sidebar content. Or not.

Post by janaf »

Here is a very simple code that checks if your sidebar field has any content and if it does, it's displayed, if not, then other modules are displayed.

This code goes into the template, where the sidebar content is:

Code: Select all

{content block="Sidebar" assign="sideb"} 
{if $sideb <>"" }
   {$sideb}
{else}
  {* show other module content*}
{/if}
Does not get much simpler than this.

Here is a much more advanced method of controlling modules per page, from i-do-this.com:

http://www.i-do-this.com/blog/42/Give-Y ... ir-Sidebar
Locked

Return to “Tips and Tricks”