Hi,
I created a message template in NMS with several html content blocks, the content blocks appear in the newsletter as divs with a background color. So far so good. But how can I hide the content blocks that are empty? I don't know how many blocks the user needs, this is different for every newsletter.
I use NMS 2.7
thanks
hide content blocks in NMS [SOLVED]
-
- Forum Members
- Posts: 59
- Joined: Thu Jan 17, 2008 10:26 am
hide content blocks in NMS [SOLVED]
Last edited by crosmuller on Tue Dec 04, 2012 11:57 am, edited 1 time in total.
Re: hide content blocks in NMS
You need to assign these to a variable first.
If NMS doesn't use assign parameter you can capture that block
then in template you check against that variable if it has some value
Code: Select all
{tag_for_nms_block assign='myvar'}
Code: Select all
{capture assign='myvar'}{tag_for_nms_block}{/capture}
Code: Select all
{if !empty($myvar)}
<!-- the template stuff -->
{$myvar} <!-- << this would return content of assigned nms block !-->
<!-- the template stuff -->
{/if}
-
- Forum Members
- Posts: 59
- Joined: Thu Jan 17, 2008 10:26 am
Re: hide content blocks in NMS
Great thanks!
Where do I put the first (or second) block of code?
Where do I put the first (or second) block of code?
-
- Forum Members
- Posts: 59
- Joined: Thu Jan 17, 2008 10:26 am
Re: hide content blocks in NMS
Thanks, it works