Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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?"
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.