hide content blocks in NMS [SOLVED]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
crosmuller
Forum Members
Forum Members
Posts: 59
Joined: Thu Jan 17, 2008 10:26 am

hide content blocks in NMS [SOLVED]

Post by crosmuller »

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
Last edited by crosmuller on Tue Dec 04, 2012 11:57 am, edited 1 time in total.
uniqu3

Re: hide content blocks in NMS

Post by uniqu3 »

You need to assign these to a variable first.

Code: Select all

{tag_for_nms_block assign='myvar'}
If NMS doesn't use assign parameter you can capture that block

Code: Select all

{capture assign='myvar'}{tag_for_nms_block}{/capture}
then in template you check against that variable if it has some value

Code: Select all

{if !empty($myvar)}
<!-- the template stuff -->
  {$myvar} <!-- << this would return content of assigned nms block !-->
<!-- the template stuff -->
{/if}
crosmuller
Forum Members
Forum Members
Posts: 59
Joined: Thu Jan 17, 2008 10:26 am

Re: hide content blocks in NMS

Post by crosmuller »

Great thanks!

Where do I put the first (or second) block of code?
uniqu3

Re: hide content blocks in NMS

Post by uniqu3 »

In NMS message template??
crosmuller
Forum Members
Forum Members
Posts: 59
Joined: Thu Jan 17, 2008 10:26 am

Re: hide content blocks in NMS

Post by crosmuller »

Thanks, it works
Post Reply

Return to “Modules/Add-Ons”