Ben NATS WalkThrough Skins Templates

From TMM Wiki
Jump to navigationJump to search

Skins and Templates Admin

A skin is a collection of templates. And, a template is base document that is used to display ever changing data. Case in point, the Affiliate page is composed of numerous templates. The page looks and feels the same for all affiliates, but the data is different and pertains to each specific affiliate. Many pages in NATS are customizable via templates in "Skins and Templates" Admin. The "Skins and Templates" Admin is divided into six (6) sections. The first three (3) are skin specific, "Basic Skins", "Advanced Skins", and "Bare Skins". The fourth is "Special Templates" followed by "Import Skin" and "Export Skin".

Inheritance is an important concept in respect to Skins and Templates. Inheritance is best exemplified using biology. When two bears procreate, they create another bear. The bear attributes from the parents are inherited by the cub. The same is true when handling skins and templates. Any changes made to the children will override the parent. For this reason, NATS does not allow you to edit the "default" skin. Instead, you need to create a copy of the skin, which creates a child of the "Default" skin. Should you make any mistakes in your child skin, you will always be able to create another skin from the NATS default. Children are indicated by being indented under its parent. In addition to understanding inheritance, it is essential to understand SMARTY. For more information about Templates and Skins with SMARTY, visit NATS4_Skins

Assuming an understanding of inheritance and SMARTY, you can create a child of any skin, in this case the "Default" skin, by clicking the Add 16.gif button associated with the "Default" skin under the Actions heading. You will prompted to give the new skin a name. After giving the skin a name and clicking "OK", you will notice that the new skin is indented and below the "Default", parent, skin, indicating that it is a child of that skin. Now, you can alter the templates collected in this skin by clicking the Edit script 16.gif button associated with this skin. You can also specify to which group; admin, sales rep, and/or affiliate the skin will apply by clicking the Pen 16.gif button. Finally, if you decide that you want to delete the skin, you can do so by clicking the Trash 16.gif button.


Basic Skins

The "Basic Skins" tab allows you to edit the header and footer templates for the affiliate and external pages only.
Note: The "external_" templates are the seen by surfer's that arrive at the NATS install prior to logging-in. Once logged-in, the "affiliate_" templates will be displayed.


Advanced Skins

Assuming that you desire to alter a template, click the Edit script 16.gif button. This will list all of the available templates that can be altered. Locate the desired template and click the Edit 16.gif under the Actions heading. This will display the contents of the template in a text area. Make any desired changes and click the "Save & Continue" or "Save" button. Note: "Save & Continue" button will bring you back to the edit template page, while "Save" will bring you back to the template list page. Additionally, you can specify different header and footer templates to be used. You will notice that the Edit 16.gif button becomes disabled. The Edit 16.gif button essentially makes a copy of the default state of the template. Once altered, the Ref 16.gif and Pen 16.gif buttons become available. All future edits of the template can be accomplished by clicking the Pen 16.gif button. At any time, you can preview the template by clicking the Srch 16.gif button. Note: Clicking the Srch 16.gif button will display the preview in a new window/tab in your browser. All future edits of the template can be accomplished by clicking the Pen 16.gif button. Clicking the Ref 16.gif button reverts the template back to its original state. Clicking the Copy 16.gif button creates an editable copy of the template. If you create a copy of a template, the Trash 16.gif button becomes available. Clicking the Trash 16.gif button deletes that template. Note: The Trash 16.gif button is only available for new and copied templates.

Additionally, you can create custom templates. Every "Advanced Skins" template in NATS is preceded with one (1) of five (5) template types which are determined by the first word in the template name followed by an underscore (_). The custom template can either be an "affiliate_", "include_", "function_", "css_" or "external_" type. So, first choose a template type. Then supply the rest of the template name in the adjoining textbox. Note: Template names are unique. NATS will not allow you to create a template with the name of an already existing template. You can choose a specific "Header" and "Footer" and supply a description. When satisfied with the name and settings, click the "Create" button.

Bare Skins =

The "Bare Skins" tab allows you to create and edit templates from scratch.


Special Templates

The "Special Templates" tab allows you to alter templates that are not directly viewable in NATS. These are used for mailings, notifications, chainInclude, which displays a pop-up to a surfer, and COTD, if purchased separately. You can alter these templates just like templates in the "Advanced Skins" area. Additionally, you can create custom "Special Templates". Every "Special Template" in NATS is preceded with one (1) of four (4) template types which are determined by the first word in the template name followed by an underscore (_). The custom template can either be a "mail_", "notify_", "COTD_", or "chaininclude_" type. So, first choose a template type. Then supply the rest of the template name in the adjoining textbox. Note: Template names are unique. NATS will not allow you to create a template with the name of an already existing name. You can choose a specific "Header" and "Footer" and supply a description. When satisfied with the name and settings, click the "Create" button.


Import Skins

The "Import Skins" tab allows you to import a skin that was developed outside of NATS but is to be used in NATS. You will be prompted to add this skin as a child of already identified NATS skin.


Export Skins

The "Export Skins" tab allows you to export a skin.