Page 1 of 1

[SOLVED] Show Global Content Block if content block is empty

Posted: Mon Jun 17, 2013 6:50 pm
by DaRichMan
I tried, I searched but with no luck. But I think for the most of tou a simple question (I hope);

In my template I have a content block for sidebar text. But if this block is empty the default has to be a Global Content Block called sidebar.

Tried (Among others);

Code: Select all

{content block="Sidebar" label="Bla bla bla" page_tab="sidebar" default="{global_content name='sidebar'}"}

Re: Show Global Content Block if content block is empty

Posted: Mon Jun 17, 2013 6:52 pm
by calguy1000
{content block="Sidebar" label="Bla bla bla" page_tab="sidebar" assign='tmp'}
{if $tmp != ''}{$tmp}{else}{global_content name='sidebar'}{/if}

Re: Show Global Content Block if content block is empty

Posted: Mon Jun 17, 2013 6:58 pm
by DaRichMan
Super, thanx for your quick reply and help