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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Event Calendar - Display only populated fields


Go to End


3 Posts   758 Views

Avatar
jparkstrio

Community Member, 2 Posts

12 November 2010 at 6:51am

OK, I know this has to be simple but my mind is just not seeing the connection. I have customized the event calendar to contain the information needed for entering events in the cms:

Location:
Phone:
Web Address:

Now what the client wants on the front end is to only display information that is populated for each field ... for example
Location:Home
Web Address: home.com

Rather than
Location: Home
Phone:
Web Address:home.com

I have been unable to successfully figure out how to do this.

Thank you for your help.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

12 November 2010 at 7:02am

<% if FieldName %>
Field Name: $FieldName
<% end_if %>

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
jparkstrio

Community Member, 2 Posts

12 November 2010 at 8:04am

I don't know you other than by your work but Uncle Cheese you ROCK ... that was so easy ... doh! Thank you!