How do you create an optional bit of code in a template?
I had success by including an entire section within a <repeater>, like this:
<h3><$title link='true' default='Enter your title'$></h3>
<$description default='<p>Enter your description</p>'$>
If the user deletes the section then everything simply disappears!
See if that works for you.
Thanks, haven't tried that yet but it should work.
While this does work most of the time - it's a bit limiting when you already have repeating items in a block of code you want to make optional.
Could CampaignMonitor pretty please add an <optional> tag of some sort? :)
I had success by including an entire section within a <repeater>
That's brilliant, I hadn't thought about that. Thanks!
Edit: also, it works in my template.
thanks for the post
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free