[SOLVED] Smarty check for empty content block?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
Oskar Rough
Forum Members
Forum Members
Posts: 40
Joined: Tue Aug 26, 2008 9:45 pm
Location: Denmark

[SOLVED] Smarty check for empty content block?

Post by Oskar Rough »

Hi there,

Is it possible to check whether there's content in a content block or not? Trouble is I've got a sidebar with a top-image. I only want to show this image if there's content in the sidebar.

I've tried with the following without success

Code: Select all

{ assign var="contentSidebar" value=$content_obj->GetPropertyValue('sidebar') } 
{ if $contentSidebar }
	<div id="sidebar">
		{content block="Sidebar"}
	</div>
{/if}
Solved: It is case-sensitive
Last edited by Anonymous on Wed Sep 30, 2009 6:27 am, edited 1 time in total.
Post Reply

Return to “CMSMS Core”