{module_subscriptions}

Description

Visitor must be logged in to a Secure Zone.

Renders a list of logged in user's secure zone subscriptions.

Syntax

{module_subscriptions render="item|collection" collection="my_custom_collection_name" template="/folder/template.tpl" showExpiry="true|false" showPrice="true|false" allowCancel="false|true" renderAsJson="false|true"}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

  • render - possible values are item or collection (the default is item). The render parameter indicates whether the template content is used to render a collection or to render a single item. Take a look at the render parameter's article for more details on how to use it
  • showExpiry - shows or hides the expiry date of the secure zone (true/false; default:true)
  • showPrice - shows or hides the cost of the subscription to that secure zone (true/false; default:true)
  • allowCancel - will show the cancel subscription link. This works only when not setting the renderAsJson to true
  • renderAsJson - Will render the secure zone information in Json format which can be manually parsed. Possible values are true or false.
  • collection - use this if you need to access the module's Liquid output tags
  • template - render the module using a custom template. You can leave the value of the template parameter blank to suppress the original output and use Liquid output tags instead

This module can be rendered using:

  • an unordered list - see the examples below for details
  • Liquid collections - here are the Liquid output tags you can use:
Liquid tag Description
{{entityId}} The CRM record's ID
{{zoneId}} The secure zone's ID
{{zoneName}} The secure zone's name
{{expiryDate}} The date access expires
{{sellAccess}} Whether this is a paid or free secure zone
{{costPeriod}} The amount charged for the access
{{cycleType}} The charge period. Possible values:
  • Once
  • Daily
  • Weekly
  • Fortnightly
  • Monthly
  • Quarterly
  • Half yearly
  • Yearly

Examples

  • {module_subscriptions} - renders
    <ul class="zoneSubscriptions">
        <li>
            <ul>
                <li class="zoneName">
                    <a href="/Default.aspx?PageID=54321">Member Only Area</a>
                </li>
                <li>Never</li>
            </ul>
        </li>
        <li>
            <ul>
                <li class="zoneName">
                    <a href="/Default.aspx?PageID=54321">Secure Zone 1</a>
                </li>
                <li>Never</li>
            </ul>
        </li>
        <li>
            <ul>
                <li class="zoneName">
                    <a href="/Default.aspx?PageID=54321">Secure Zone 2</a>
                </li>
                <li>Never</li>
            </ul>
        </li>
    </ul>
    
    
  • {module_subscriptions showExpiry="true" showPrice="true" renderAsJson="true"} - renders
    
    "{  
       "SecureZoneSubscriptionList":{  
          "EntityId":9532870,
          "Subscriptions":[  
             {  
                "ZoneName":"Member Only Area",
                "ZoneId":"51",
                "ExpiryDate":"01/01/9999 00:00:00",
                "SellAccess":false,
                "CostPerPeriod":"0",
                "CycleType":""
             },
             {  
                "ZoneName":"photo download monthly plan",
                "ZoneId":"2722",
                "ExpiryDate":"01/01/9999 00:00:00",
                "SellAccess":true,
                "CostPerPeriod":"20",
                "CycleType":"Monthly"
             },
             {  
                "ZoneName":"photo download weekly plan",
                "ZoneId":"2723",
                "ExpiryDate":"01/01/9999 00:00:00",
                "SellAccess":true,
                "CostPerPeriod":"6",
                "CycleType":"Monthly"
             },
             {  
                "ZoneName":"sz1",
                "ZoneId":"2762",
                "ExpiryDate":"01/01/9999 00:00:00",
                "SellAccess":false,
                "CostPerPeriod":"0",
                "CycleType":""
             },
             {  
                "ZoneName":"sz2",
                "ZoneId":"2763",
                "ExpiryDate":"01/01/9999 00:00:00",
                "SellAccess":false,
                "CostPerPeriod":"0",
                "CycleType":""
             }
    
          ]
       }
    }
    
    
  • {module_subscriptions showExpiry="true" showPrice="true" allowCancel="true"} - renders
    
    <ul class="zoneSubscriptions">
        <li>
            <ul>
                <li class="zoneName"><a href="/Default.aspx?PageID=5387991">Member Only Area</a>
                </li>
                <li>Never</li>
                <li><a href="/ZoneProcess.aspx?A=Cancel&amp;ZoneId=51">Cancel</a>
                </li>
            </ul>
        </li>
        <li>
            <ul>
                <li class="zoneName"><a href="/Default.aspx?PageID=5059413">photo download premium</a>
                </li>
                <li>Never</li>
                <li>£20.00 Monthly</li>
                <li><a href="/ZoneProcess.aspx?A=Cancel&amp;ZoneId=2722">Cancel</a>
                </li>
            </ul>
        </li>
        <li>
            <ul>
                <li class="zoneName"><a href="/Default.aspx?PageID=5059413">photo download standard</a>
                </li>
                <li>Never</li>
                <li>£6.00 Monthly</li>
                <li><a href="/ZoneProcess.aspx?A=Cancel&amp;ZoneId=2723">Cancel</a>
                </li>
            </ul>
        </li>
    </ul>
    
    

Syntax

{module_subscriptions,show_expiry,show_prices,show_cancel_link,render_json}

Parameters

  • show_expiry - shows or hides the expiry date of the secure zone (true/false; default:true)
  • show_prices - shows or hides the cost of the subscription to that secure zone (true/false; default:true)
  • show_cancel_link - will show the cancel subscription link. This works only when not setting the render_json to true
  • render_json - Will render the secure zone information in Json format which can be manually parsed (true/false)

Examples

  • {module_subscriptions} - renders
    <ul class="zoneSubscriptions">
        <li>
            <ul>
                <li class="zoneName">
                    <a href="/Default.aspx?PageID=54321">Member Only Area</a>
                </li>
                <li>Never</li>
            </ul>
        </li>
        <li>
            <ul>
                <li class="zoneName">
                    <a href="/Default.aspx?PageID=54321">Secure Zone 1</a>
                </li>
                <li>Never</li>
            </ul>
        </li>
        <li>
            <ul>
                <li class="zoneName">
                    <a href="/Default.aspx?PageID=54321">Secure Zone 2</a>
                </li>
                <li>Never</li>
            </ul>
        </li>
    </ul>
    
    
  • {module_subscriptions,true,true,,true} - renders
    
    "SecureZoneSubscriptionList": {
        "EntityId": 11723915,
        "Subscriptions": [{
                "CostPerPeriod": "0",
                "CycleType": ", "
                ExpiryDate " : "
                01 / 01 / 9999 00: 00: 00 ", "
                SellAccess " : false, "
                ZoneId " : "
                51 ", "
                ZoneName " : "
                Member Only Area " }, { "
                CostPerPeriod " : "
                0 ", "
                CycleType " : ",
                "ExpiryDate": "01/01/9999 00:00:00",
                "SellAccess": false,
                "ZoneId": "4859",
                "ZoneName": "test secure zone"
            }, {
                "CostPerPeriod": "0",
                "CycleType": ", "
                ExpiryDate " : "
                01 / 01 / 9999 00: 00: 00 ", "
                SellAccess " : false, "
                ZoneId " : "
                4871 ", "
                ZoneName " : "
                test secure zone 2 " } ] } }
    
    
  • {module_subscriptions,true,true,true} - renders
    
    <ul class="zoneSubscriptions">
        <li>
            <ul>
                <li class="zoneName"><a href="/Default.aspx?PageID=5387991">Member Only Area</a>
                </li>
                <li>Never</li>
                <li><a href="/ZoneProcess.aspx?A=Cancel&amp;ZoneId=51">Cancel</a>
                </li>
            </ul>
        </li>
        <li>
            <ul>
                <li class="zoneName"><a href="/Default.aspx?PageID=5059413">photo download premium</a>
                </li>
                <li>Never</li>
                <li>£20.00 Monthly</li>
                <li><a href="/ZoneProcess.aspx?A=Cancel&amp;ZoneId=2722">Cancel</a>
                </li>
            </ul>
        </li>
        <li>
            <ul>
                <li class="zoneName"><a href="/Default.aspx?PageID=5059413">photo download standard</a>
                </li>
                <li>Never</li>
                <li>£6.00 Monthly</li>
                <li><a href="/ZoneProcess.aspx?A=Cancel&amp;ZoneId=2723">Cancel</a>
                </li>
            </ul>
        </li>
    </ul>