How to display custom attributes only when filled in?
-
I created a number of custom attributes for my events, and I have their content displaying on my events pages without a problem. However, not every event has every attribute filled in. How can I show the content of a custom attribute only when it is filled in, and otherwise show nothing?
Right now, I’m using the Formatting setting area of EM to control what displays on my single event page. Here’s what that looks like:
<span class="meta date">#F #j #@_{\&\n\d\a\s\h\;j}, #Y{has_location}, in #_LOCATIONNAME{/has_location}</span> <span class="meta">#_CATEGORYNAME:</span> <h2>"#_ATT{Session Title}"</h2> #_EVENTNOTES <ul class="list-simple"> <li><a href="#_ATT{Follow-up Blog Post}">Get related resources</a></li> <li><a href="#_ATT{Slideshare URL}">View on Slideshare</a></li> <li><a href="#_ATT{Recording URL}">View recording</a></li> <li><a href="#_ATT{Conference Site}">Go to conference site</a></li> </ul>
I’m not that skilled at PHP, so please be gentle in your reply. ??
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to display custom attributes only when filled in?’ is closed to new replies.