How to edit the templates
|
|
This chapter explains how to edit the template with a normal text editor.
Note: We recommend that you use the link page template wizard to create your first link directory templates. This chapter and the following chapters help you to go into the details and to further customize your pages.
|
Visit http://www.Axandra.com/recommended-sites to take a look at our own link directory. As you can see, it perfectly matches the design of our web site although it has been automatically created by ARELIS. You can also click here to see more examples of link directories created by ARELIS.
If you have difficulty in adjusting the templates, read the following tutorial for further information.
Tutorial - Table of Contents
| 1. | Templates and Template Variables
|
| 8. | How To Save Separate Sub Category web Pages
|
1. Templates and Template Variables
Templates
| ARELIS (ARELIS) uses templates to create your link directory. Templates are simple text files with or without HTML tags.
|
| If you want to create your own template file, you must save it to the "Link Directory Templates" directory within the "ARELIS" directory on your hard disk. Click the Open Templates Directory button in the Create Link Pages window to open the directory with the template files.
|
Template Variables
| Template variables represent information that is stored in the web site list of link partners in the main window. Template variables will be replaced with names or information from your link collection. For example, the template variable [A-Today-Date-Short] will be replaced with an human readable date (e.g. 25 March 2002).
|
| All template variables are enclosed in brackets and begin with "A-". The variable names are case-insensitive so the case doesn't matter.
|
2. First Example
Let's have our first example. Create a text file with the following contents:
---snip---
| The link directory of [A-Company-Name] consists of [A-Total-Number-Of-Links] in [A-Number-of-categories] categories.
| ---snip---
Now save it as example.htm to the "Link Directory Templates" directory within the "ARELIS" directory (which is usually located in your Program Files directory on your hard disk).
Open the Create Link Pages window, choose the newly created file example.htm and click the Next button several times until the link directory has been created. You'll see that ARELIS will have replaced the variables [A-Company-Name], [A-Total-Number-Of-Links] and [A-Number-of-categories] with your company name and the actual number of categories:
| The link directory of Future Enterprises consists of 167 links in 15 categories.
|
As mentioned above, the case doesn't matter. You can write [A-Number-Of-Categories] or [A-number-of-categories] or even [A-nUmbEr-oF-cAtegorIes]. :-)
3. web Pages
Most of the time, you want the link directory to be created as a web page. To specify the file name for your link directory index file, use the template variable
[A-File-Name:links.htm]
Of course, you don't need to use "links.htm". You can use any name for your link directory as you want, for example "link-directory.htm" or "resources.html".
Example: [A-File-Name:links-page.htm] saves your file as "links-page.htm".
It only makes sense to use this template variable once in your template file. ARELIS only recognizes the first occurrence of the [A-File-Name:xxx] variable.
ARELIS will convert all special characters to their HTML equivalent, for example the company name "Barny & Co." becomes "Barny & Co.".
4. More Easy Variables
Before we get to the more complicated variables, let's have a look at the easy ones:
| - [A-Company-Name] displays the company name which you can enter in the Edit Project window in ARELIS
|
| - [A-Homepage-URL] displays the URL which you can enter in the Edit Projects window
|
| - [A-Domain] displays the domain of the URL which you can enter in the Edit Projects window
|
| - [A-Today-Date-Long] displays the long version of today's date
|
| - [A-Today-Date-Short] displays the short version of today's date
|
| - [A-Total-Number-Of-Links] displays the total number of links in your link directory
|
| - [A-Number-of-Categories] displays the number of different categories
|
| - [A-Home-File-Name] will be replaced with the start page file name of your link directory.
|
Tip: If you want to create the link directory for the web, you can use the template variables [A-Company-Name] and [A-Domain] for your meta tags.
Example:
---snip---
| <TITLE>The Link Directory of [A-Company-Name]</TITLE>
|
| <META NAME="Keywords" CONTENT="[A-Company-Name], link directory, link partners">
|
| <META NAME="Description" CONTENT="This is the link directory of [A-Company-Name].">
|
| <H2><CENTER>Link Directory (as of [A-Today-Date-Short])</CENTER></H2>
| ---snip---
5. Category List
To list all categories, you must use the template variables
[A-Category-Repeat] and [A-Category-Repeat-End]
Both variables form a block of text. Within the two variables, you can use the variables
| - [A-Category-Name] (displays the current category name)
|
| - [A-Category-Nr] (displays the current category number)
|
| - [A-Number-of-sub-categories] (displays the number of sub categories of the current category)
|
| - [A-Number-of-links-in-category] (displays the number of links of the current category)
|
Example: Suppose you have four different categories in your link partner list in the main window: Shoe Information, Shoe Manufacturer, Shoe Shops and Shoe Wholesaler. In this case, the following text
---snip---
| There are [A-Number-of-Categories] categories:
|
| [A-Category-Repeat][A-Category-Nr]. [A-Category-Name]
| ---snip---
will result in
---
---
As you can see, everything between [A-Category-Repeat] and [A-Category-Repeat-End] has been repeated as often as there are categories. The variable [A-Category-Nr] has been substituted with "1", "2", "3" and "4". Instead of [A-Category-Name] the actual category names have been inserted.
The variables [A-Category-Name], [A-Category-Nr] and [A-Number-of-links-in-category] may only be used between the two variables [A-Category-Repeat] and [A-Category-Repeat-End].
Now let's use the variable [A-Number-of-links-in-category]. The text
---snip---
| There are [A-Number-of-Categories] categories:
|
| [A-Category-Repeat][A-Category-Nr]. [A-Category-Name] ([A-Number-of-links-in-category])[A-Category-Repeat-End]
| ---snip---
could result in
---
---
Tip: You may use the variables [A-Category-Repeat] and [A-Category-Repeat-End] more than once in your template text. For example, this allows you to create a short contents overview at the top of your page.
6. Sub Categories
Now let's integrate sub categories in our links directory. It works similar to the category variables, however, you must use [A-Sub-Category-Repeat] and [A-Sub-Category-Repeat-End] instead of [A-Category-Repeat] and [A-Category-Repeat-End].
Please note that the [A-Sub-Category-Repeat] and [A-Sub-Category-Repeat-End] variables can only be used within the [A-Category-Repeat] and [A-Category-Repeat-End] variables.
Example:
---snip---
| There are [A-Number-of-Categories] categories:
|
| [A-Category-Repeat]* [A-Category-Name]
|
| -> [A-Sub-Category-Nr]. [A-Sub-Category-Name]
|
| [A-Sub-Category-Repeat-End]
| ---snip---
could result in
---
| -> 1. About shoes that we sell
|
| -> 2. About shoes in general
| ---
Between the two variables [A-Sub-Category-Repeat] and [A-Sub-Category-Repeat-End] you can use the following variables to display information about the current sub category:
- [A-Sub-Category-Nr] (displays the current sub category number)
- [A-Sub-Category-Name] (displays the current sub category name)
- [A-Number-of-links-in-sub-category] (displays the number of links of the current sub category)
7. Links
To display the actual links in your links directory, you need links variables. They work the same way as the category variables and the sub category variables do.
Between the [A-Link-Repeat] and [A-Link-Repeat-End] variables you may use the following links variables:
| - [A-Link-Nr] (displays the current link number)
|
| - [A-Link-URL] (displays the current link URL)
|
| - [A-Found-URL] (displays the URL as listed in the web site list of the main window)
|
| - [A-Link-Domain] (displays the domain of the current link URL)
|
| - [A-Link-Title] (displays the current link title which you can edit in the Edit Site panel)
|
| - [A-Link-Description] (displays the current link description which you can edit in the Edit Site panel)
|
| - [A-Link-Back-Image] (if the web site links back to you, displays the link back image that you can edit in the Create Link Pages window, step 2)
|
| - [A-Link-Banner-URL] (displays the current link banner URL which you can edit in the Edit Site panel)
|
As you can see, you have a lot of possibilities to adjust the links directory to your needs.
The [A-Link-Repeat] and [A-Link-Repeat-End] variables may only be used within the [A-Sub-Category-Repeat] and [A-Sub-Category-Repeat-End] variables (which may only be used within the [A-Category-Repeat] and [A-Category-Repeat-End]).
Example:
---snip---
| [A-Category-Repeat]* [A-Category-Name]
|
| [A-Link-Repeat] [A-Link-Title], [A-Link-URL][A-Link-Repeat-End]
|
| [A-Sub-Category-Repeat-End]
| ---snip---
could result in
---
| -> 1. About shoes that we sell
|
| Shoes from Italy, http://www.topshoes.com/ItalyShoes.htm
|
| Shoes from Poland, http://www.topshoes.com/Shoes_from_Poland.htm
|
| -> 2. About shoes in general
|
| How you can recognize quality shoes, http://www.topshoes.com/quality.htm
|
| The history of shoes, http://www.topshoes.com/history.htm
|
| Manufacturers from Arizona, http://www.topshoes.com/arizona.htm
|
8. How To Save Separate Sub Category web Pages
If you used ARELIS for a long time, you'll have collected many link partner web sites. A single links page will become too big so you surely want to have a single contents web page which links to separate sub category web pages.
Even for separate sub category web pages, you'll have only one single template file. Within the two variables [A-Sub-Category-Repeat] and [A-Sub-Category-Repeat-End] you can use the variables [A-Sub-Category-Save] and [A-Sub-Category-Save-End].
Everything between the variables [A-Sub-Category-Save] and [A-Sub-Category-Save-End] will be saved to a separate web page. The file name will always have the format "CategoryName-SubCategoryName". So if the category is "Shoe Manufacturer" and the sub category is "USA", the file name will be "Shoe Manufacturer-USA.htm". The file extension is the same as for the contents web page. Remember, you can change the file name and thus the file extension for the contents web page with the [A-File-Name:xxx] variable.
You can link from the contents web page to one of the separate sub category web pages with the [A-Sub-Category-Filename] variable which will be replaced with the sub category file name, e.g. "Shoe Manufacturer-USA.htm".
To see an example for separate sub category web pages, please take a look at a simple multiple page directory template in the template directory of ARELIS.
|