Page 1 of 1

[SOLVED] Smarty check for empty content block?

Posted: Wed Sep 30, 2009 6:20 am
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