Ecom:Cart.UseNewsletterSubscription

Version: - boolean  

Summary

Returns the state of the newsletter subscription checkbox.

Settings

The value is based on the newsletter subscription field. (Page > Paragraph > Module tab > Newsletter section > Use newsletter subscription)

Remarks

The tag outputs "True" if newsletter subscription has been set. If not the tag outputs an empty string.

Examples

Outputting the template tag

@GetBoolean("Ecom:Cart.UseNewsletterSubscription")

Check if tag has a value

@if(!bool.IsNullOrWhiteSpace(GetBoolean("Ecom:Cart.UseNewsletterSubscription"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ bool storedTag = GetBoolean("Ecom:Cart.UseNewsletterSubscription"); }

Outputting the template tag

<!--@Ecom:Cart.UseNewsletterSubscription-->

Check if boolean has a value

<!--@If Defined(@Ecom:Cart.UseNewsletterSubscription)--> Let's output this tag here: <strong><!--@Ecom:Cart.UseNewsletterSubscription--></strong> <!--@EndIf(@Ecom:Cart.UseNewsletterSubscription)-->