![]() |
text blocks
iphlex > webphlex > documentation > text blocks |
show contents
hide contents |
|
| ||
| ||
|
| ||||
|
top of page
| ||||
|
what is a text block?
A text block can be a single word or symbol, or any text up to 65,536 characters long.
It can exist in a single version or in different versions for different languages.
It can be referenced by a user-defined code or a unique number, and used anywhere in the system where text would normally be entered; it will be replaced, where appropriate, by the actual contents of the text block in the language currently being used.
| |||
|
top of page
| |||
|
advantages of using text blocks
Using a text block offers several advantages over the use of a normal text field:
| ||
|
top of page
| ||
| using a text block to replace a field
Throughout the system, many fields capable of holding text can also be replaced by a text block. These can be recognised by the presence of a small numeric field with a pull-down button, usually near the lower right corner of the field.
Text directly entered into the field exists in only one version, i.e. the version which is visible on the screen:
| ||
(image_0011) |
|
|
| ||
| ||
|
If a text block number is entered into the text block number field, then whenever the main field is used, the contents of the text block will be retrieved instead of the actual field contents. To indicate this, the main field contents are replaced on the screen with the contents of the text block, if possible in the language currently in use:
| ||
(image_0012) |
|
|
| ||
| ||
|
The background colour of the main field changes, and the field contents can no longer be directly changed.
To work on the text block contents, the text block screen can be called up by double-clicking in the text block number field.
| |||
|
top of page
| |||
|
converting a normal text field into a text block
If the main field is filled and the text block number field empty, double-clicking in the text block number field will invoke the option of converting the main field into a text block. After confirmation, a new text block will be created containing the contents of the main field (assumed to be in the page group's default language), and its number will be entered into the text block number field.
It is also possible to convert all of a page group's fields into text blocks using the button 'convert texts to text blocks' (control panel > web pages > web page groups > advanced). In this way a web site designed in one language can easily be converted into a multi-language site.
| ||
|
top of page
| ||
|
'embedded' text blocks
As well as being used to replace the entire contents of a field, a text block can also be 'embedded' in the contents of a text field (or another text block), using a replacement code containing its code or number. When the field is used, the replacement code will then be replaced by the contents of the text block in the correct language.
In replacement codes of this type, 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.
| |||||||||||||||||||||||||||||||||||||||||
|
top of page
| |||||||||||||||||||||||||||||||||||||||||
|
what is the best way to use text blocks?
As shown above, a text block can be used to replace the entire contents of a field, or it can be embedded inside the field's content. In many situations the same effect can be achieved using either method, but they both have their advantages and disadvantages:
When a text block replaces the entire contents of a field, its number is stored in the field's record. This means that
By embedding text blocks in a field's content, the field can be built up of two or more text blocks, or a combination of fixed text (i.e. text which is the same for all languages, e.g. HTML tags and replacement codes) and language-dependant texts. As a text block can itself contain other text blocks, it is possible to build an efficient system for retrieving texts in a multi-language environment.
| ||
|
top of page
| ||
|
types of text blocks
A text block can be assigned a 'type' indication (at control panel > texts and documents > text blocks > general), e.g.
Apart from that all text blocks are equal and you can use any text block in any situation.
| |||
|
top of page
| |||
|
the OK? indicator
Each language version of a text block has an OK? indicator (control panel > texts and documents > text blocks > general), which is used in translation management.
When a text is changed in one language, the OK? indicators of all other language versions are automatically turned off, the idea being they will be manually turned on again when these translated versions have been checked and corrected if necessary.
A user who is allowed to change any language can turn the OK? indicators of all language versions on or off simultaneously using the indicator at the top of the text block screen. A user who is only allowed to change texts in one language can only set the indicator for that language.
As the OK? indicator can be used as a selection criterion in the screen 'perform an action' (control panel > actions > perform an action), it is easy, for instance, to work on all texts for which the versions in one particular language have recently been changed.
| |||
|
top of page
| |||
|
main text & short text
Each text block actually consists of two texts in each language, a main text and a short text:
| |||
|
top of page
| |||
|
hidden text blocks
Text blocks with the "hidden?" indicator set on will not be found in the global find screen and will not be included in actions. They are also not shown in the text block and search screens unless the indicator "show hidden text blocks?" is set on. All the help texts, for example, are actually hidden text blocks.
| |||
| |||
|
Tip: you can search for a text in the help system by opening the text blocks screen (control panel > texts and documents > text blocks), clicking the search button | |||
|
top of page
| |||
| iphlex > webphlex > documentation > text blocks | Copyright © 2006 iphlex systems |