3444 Posts in 1030 Topics by 871 members
|Go to End|
29 April 2009 at 5:38pm
I am building a site right now, that has a place for a user to enter custom content into their sidebar. This content shows up inside a custom div, with a background image.
Is there a way, inside my templates, that I can essentially say "only if this content has been entered in the CMS (field is not blank/not NULL), than show this variable, else, ignore it?"
29 April 2009 at 5:43pm
Nevermind, I figured this out. For anyone else who may need this, here is the code, assuming you're working with the variable called SidebarContent
<% if SidebarContent %>$SidebarContent<% end_if %>
Notice that the <% if SidebarContent %> does not contain a dollar sign ($), this is what was messing me up.
|Go to Top|