Note: Editing templates and block templates requires Certified Manager (full access). (For information on different access levels see Groups - Access Levels. If you are not certified you will need to contact TownNews Training and Documentation by submitting a ticket through the BLOX CMS admin, or by calling 800-293-9576 and asking for the Training department.

For more information about becoming certified please see BLOX Template - SLA.



Note: If you want fully custom messages you need to override the app Metering/macros/module.messages.utl file.

If you just want to override a single message you just have to override that macro. (See below for the individual macros)
A message with the 'data-count' attribute and a value containing a number will only be displayed at a particular count. A message without a 'data-count' attribute will, if it exists, display if there is no message for a specific count.
A message with the 'data-registered' attribute set to true/false will only be displayed when a user is logged in/not logged in these messages are only available when also using a specific count.
Elements with the 'count' class will have their content replaced with the current ascending count. Elements with the 'remaining' class will have their content replaced with the current descending count. Elements with the 'total' class will have their content replaced with the total count.

Best Practice: The utl file can be named anything, although naming it the same as the existing file may be a good idea.


ACCESSING APPLICATIONS

From the drop-down in the the upper left choose Design / Templates...


NOTE: Not sure how to access BLOX Applications? Click here


Accessing Templates

The existing metering messages are located in Flex / Components / app Metering/macros/module.messages.utl

+3 
Flex / Components / app Metering / macros / module.messages.utl

NOTE: The TN logo on this directory means this folder contains TownNews core files. Core files can be edited, but changes for different types of files are handled in different ways. Please see the documentation for specific types of changes found on the Developer's Corner page of Help.BLOXCMS.com website.


You can view these files by clicking the name of the file and View, or by double-clicking the name of the file.

+3 
view

To edit/replace the current metering messages go to  Flex / Components / _Site / macros.

+3 
Flex / Components / _Site / macros

If the file module.messages.utl already exists then open it by clicking the name of the file and View, or by double-clicking the name of the file.

If the module.messages.utl doesn't exist in the macros folder, right-click on the macros folder and choose New file. 

The new file must be named module.messages.utl

Example

Here is an example and an explanation of the UTL code that you will edit.

+3 
MeteringUTLMessagesLegend.jpg

1  UTL Macro Code:  This is an example of a macro that you can customize (the Title (header) and Message). A list of the macros available to you are below. The Macro Name is in the first line of the code, this does not get changed.

1a  Header:  Only edit what's between the open and close header tags (ie: <h4> and </h4>) - This will appear on the site as the Title.

1b  Custom Comment:  Only edit what's between the open and close paragraph tags (ie: <p> and </p>). Here you would enter a comment or instructions you want the user to read or do.

You can copy the macro code that you want to edit below and paste it into your module.messages.utl. If you do need to edit the macro you do not need to copy it into your module.messages.utl. If BLOX does not encounter the macro in your module.messages.utl file it will go to the TownNews version for that macro.

Customizable Macros

meter_messageLoginPrompt:

This is displayed on the asset page just before the user is prompted to login.

[% macro meter_messageLoginPrompt(); -%]
    <div class="meter notification access alert alert-dismissable alert-info">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <h4 class="clearfix meter-heading media-heading row">
            Custom Message: Login Prompt
        </h4>
        <p>This is a custom message</p>
    </div>
[% end -%]

meter_messageFirst:

This is displayed on the asset page on the users first view.

[% macro meter_messageFirst(); -%]
    <div class="meter notification access alert alert-dismissable alert-info hidden-print">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        [% if URL_CONFIG.metering_count != 'off' %]
        <h4 class="clearfix meter-heading  media-heading row">
            [% if URL_CONFIG.metering_count == "asc" -%]
            Viewed <span class="count"></span> of  remaining of </span>
            [% end %]
        </div>
        [% end %] 
        <p><strong>Welcome! We hope that you enjoy our free content.</p>
    </div>
[% end -%]</pre>

meter_messageLoggedIn:

If enabled, this displays on the asset page when the user has just logged in after the registration wall.

[% macro meter_messageLoggedIn(); -%]
    <div class="meter notification access alert alert-dismissable alert-info">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <h4 class="clearfix meter-heading media-heading row">
            Custom Message:  Logged in
        </h4>
        <p>This is a custom message</p>
    </div>
[% end; %]

meter_messageLastFree:

This is displayed on the asset page just before the user is presented with the wall.

[% macro meter_messageLastFree(); -%]
    <div class="meter notification access alert alert-dismissable alert-info">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <h4 class="clearfix meter-heading media-heading row">
            Custom Message: Last Free
        </h4>
        <p>This is a custom message</p>
    </div>
[% end; %]

meter_messageGeneral:

If enabled, this displays on the asset page when there is no other available message.

[% macro meter_messageGeneral(); -%]
    <div class="meter notification access alert alert-dismissable alert-info">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <h4 class="clearfix meter-heading media-heading row">
            Custom Message: General
        </h4>
        <p>This is a custom message</p>
    </div>
[% end; %]

meter_messageReadPreviously:

If enabled, this displays on the asset page when the user has already read an asset.

[% macro meter_messageReadPreviously(); -%]
    <div class="meter notification access alert alert-dismissable alert-info">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <h4 class="clearfix meter-heading media-heading row">
            Custom Message: Read Previously
        </h4>
        <p>This is a custom message</p>
    </div>
[% end; %]

meter_messageAssetSubscription:

If enabled, this displays on the asset page when the user is required to subscribe.

[% macro meter_messageAssetSubscription(); -%]
    <div class="meter message wall panel panel-default">
        <div class="panel-body">
            <h4 class="meter-heading media-heading">
                Custom Message: Asset Subscription Wall
            </h4>
            <p>This is a custom message</p>
        </div>
    </div>
[% end; %]

meter_messageAssetRegistration:

If enabled, this displays on the asset page when the user is required to register or log in.

[% macro meter_messageAssetRegistration(); -%]
    <div class="meter message wall panel panel-default">
        <div class="panel-body">
            <h4 class="meter-heading media-heading">
                Custom Message: Asset Registration Wall
            </h4>
            <p>This is a custom message</p>
        </div>
    </div>
[% end; %]