![]() |
templates and text replacement
iphlex > webphlex > documentation > templates and text replacement |
show contents
hide contents |
|
| ||
| ||
| ||||
|
top of page
| ||||
|
text replacement codes
The templates contain text replacement codes, which start and end with the character #. When the page group is generated or previewed, they are replaced by their actual value. A simple example: the template for this page starts like this:
<HTML>
and after generation it becomes...
<HTML>
Text replacement codes are not case-sensitive.
Many replacement codes can be modified by parameters, to put the retrieved text into upper or lower case, limit its length, add or remove HTML codes, etc. | |||||||
|
top of page
| |||||||
|
local text replacement codes
The text replacement codes based on data from the current page group are known as local text replacement codes. These include:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
top of page
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
system-wide text replacement codes
In these codes a numeric value is interpreted as a key number, and a non-numeric value as a code. However, a code which happens to be completely numeric can be used by putting it between quotes.
Click here for a complete list of the system-wide replacement codes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
top of page
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
language text replacement codes
During the replacement of both the local and system-wide replacement codes, wherever the result is language dependent it will be based on the language currently being generated. It is also possible to retrieve information on the current language directly: N.B. the language extension for filenames will always be empty for the default language.
If the indicator 'force lower case in filenames?' is set (control panel > web pages > web page groups), then the language extention will automatically be in lower case.
| |||||||||||||||||||||
|
top of page
| |||||||||||||||||||||
|
previewing local text replacement codes
At various places in the page group screen, you'll see a button for previewing all the available local text replacement codes Clicking this button on the main page will show data which changes per main page (e.g. main page URL, page title), whereas clicking it on the detail page or element will show data which changes per element (e.g. element title, destination URL). Data which is fixed for the entire page group (e.g. page group URL, number of pages) is always shown.
Note that this procedure retrieves a large number of codes, including all available codes for the first, last, previous and next elements / detail pages, plus those for the parent page group if one exists, whereas these codes are normally only retrieved as and when they are actually used. This means that, for a large or complex page group, viewing the replacement codes can be a time-consuming process. It is also possible that situations can arise (e.g. text blocks calling themselves, attempts to use data which is not present) which will never occur when actually generating the page group or previewing parts of it, but which will result in error messages here. Just ignore these messages.
The window showing the generated text has a button | |||
|
top of page
| |||
| iphlex > webphlex > documentation > templates and text replacement | Copyright © 2006 iphlex systems |