Editing Web Templates
The web template editor allows site administrators and list owners to customize the web interface. Editing the web templates manually requires familiarity with the structure of the templates as well as the commands and conditions used. To make simpler color or branding changes to a list or the web interface, use the List Customization and Site Customization sections respectively.
When you first enter the template editor, all web templates are listed alphabetically in a table. You can click on the column headers to change your sorting preferences. The case-insensitive filter row allows you to filter the templates that are displayed in the table. For example, if you want to see the templates containing all of the help and documentation used for the web interface, type HELPTEXT in the filter box. To open a template for editing, simply click on its name. A new screen will open with a large text area, allowing you to make the desired changes to the template. Click "Update" to save the template. If you make a mistake, click "Revert" to restore the default version of the template.
Template Categories
This pulldown menu allows you to narrow the templates shown in the table. For example, if you only want to see the most frequently modified templates or layout-related templates, choose the relevant option from the menu and click "Select". Use the Only Display Modified Templates option to narrow the list down to templates that have already been edited.
Search Templates
This field allows you to search the content of the web templates. Simply type the desired query in the text box and click "Search".
Create New Template
To create a new web template, click on "Create New Template", enter the template name and a short description and click "Create". Note that the template name cannot contain spaces or special characters.
Web Template Types and Names
There are many different types of web templates. The first part of the template name indicates the type:
- DEFAULTS: The DEFAULTS templates contain the default preferences, navigation URLs and color scheme of the web interface. These templates can be edited if needed.
- CSS: The CSS templates contain the stylesheets that control the design of the web interface. These templates can be edited if needed.
- JS: The JS template contains all of the Javascript that powers the web interface. This template requires expert-level knowledge and should generally not be edited.
- LAYOUT: The LAYOUT templates contain the structure of the HTML and insert all of the sub-components. These templates can be edited if needed.
- BODY: THE BODY templates contain the general layout of each section. These templates can be edited if needed.
- OBJECT: The OBJECT templates contain advanced code and functionality. These templates require expert-level knowledge and should generally not be edited.
- TEXT: The TEXT templates contain all of the text variables used in the web interface and can be edited or translated.
- HELP: The HELP templates are configuration templates and define which documentation will be shown with which section. These templates don't generally need to be edited.
- HELPTEXT: The HELPTEXT templates contain all of the help and documentation and can be edited or translated.
The second part of the template name indicated the sections where it is used. For example, TEXT-GLOBAL-ALL is used globally by multiple sections, while TEXT-SYSCFG is only used by the site configuration section.
This non-exhaustive list summarizes the most commonly used sections:
- AI: Site Archive Index
- A0: List Archive Home
- A1: List Archive Index
- A2: List Archive Message Viewer
- ACTMGR: Subscriber Management
- BLOG: Blog Configuration
- BULKOP: Bulk Operations
- CHPW: Change Password Screen
- CUSTOM: Site and List Customization
- DASHBOARD-ADMIN: Site Administrator Dashboard
- DASHBOARD-OWNER: List Owner Dashboard
- DELETE: List Deletion
- DELIV: Deliverability Dashboard
- EM: Edit Mode
- HDREDIT: List Configuration Editor
- LAK: LAK Input
- LCMD/LCMD2: LISTSERV Command Interface
- LOG: Server and List Activity Reports
- LOGIN: Login Screen
- MM: Mail-Merge Interface
- MODERATION: List Moderation
- NEWLIST: List Creation
- NEWPW: New Password Screen
- P1: Message Posting Interface
- PREFS: Personal Preferences
- REPORT: Reporting Interface (includes Server Usage Reports, List Reports, Subscriber Reports, Subscriber's Corner and Archive Search)
- SUBEDIT: Subscription Interface
- SYSCFG: Site Configuration
- TPLMGR: Web and Mail Template Editor
- T1: Newsletter Posting Interface
- T2: Newsletter Template Builder
- WIZARD: List Configuration Wizard
Web Template Commands and Conditions
The web templates are not pure HTML code. They consist of HTML code interspersed with template commands and conditions. Commands and conditions in web templates always begin with a + in the first character position of a line. Each command must be on a line by itself. The following list contains some examples of common commands and conditions:
+* |
Defines a comment line.
+* This is a comment and will not be shown in the browser |
+SE |
Defines the value of a template variable.
+SE SKIN default The value of SKIN is &+SKIN; |
+SEP |
Defines the value of a personal preference.
+SEP GLOBAL_START INDEX The value of GLOBAL_START is &+PREF(GLOBAL_START); |
+IM |
Imbeds the contents of another template into the current one. Only other web templates may be imbedded. You cannot mix web and mail templates.
+IM BODY-GLOBAL-LISTADDRESS |
+BB +ELSE +EB |
Creates a conditional block. The code found between the +BB and +ELSE is only displayed if the condition is true. The code found between the +ELSE and +EB is only displayed if the condition is false.
+BB &+IS_ADMIN; The logged-in user is a site administrator +ELSE The logged-in user is not a site administrator +EB
+BB ^&+LOGGED_IN; The user is not logged in +EB
+BB &+EQU(&+EMAIL-ADDRESS;,joe@example.com); The logged-in user is joe@example.com +ELSE The logged-in user is not joe@example.com +EB
+SE STRING &+LISTNAME; +SB sales The listname contains the word "sales" +ELSE The listname does not contain the word "sales" +EB |
+IF +ELSE +ENDIF |
Alternative method to create a conditional block. The code found between the +IF and +ELSE is only displayed if the condition is true. The code found between the +ELSE and +ENDIF is only displayed if the condition is false.
+IF (&+EMAIL-ADDRESS; = "joe@example.com") The logged-in user is joe@example.com +ELSE The logged-in user is not joe@example.com +ENDIF
+IF (&+LISTNAME; =* *sales*) The list name contains the word "sales" +ELSE The list name does not contain the word "sales" +ENDIF |
LISTSERV® is L-Soft's email list management software, originally developed by Eric Thomas in 1986. Visit the LISTSERV® Resource Center for more complete documentation.
LISTSERV® is a registered trademark. The trademark identifies LISTSERV® as a brand of email list management software developed by L-Soft.
|