|
|
If you wanna create your own tags you have to define it before.
This can be done by the define tag.
The code between the define tag is JavaScript code and will be
interpreted. But this code has some limitations in the contrast
to the Script Tag. Please study the
Script Tag and experimentice with the
interpreter before defining your own tags.
Examples for using own tags can be found at the Examples Collection
and the Tutorial. (
Documentation
)
| |
|
Define Tag Definition:
<define
|
| (type: open_close_tag) |
|
name="tag_name" |
|
|
|
|
|
type="simple_tag" |
(optional) |
|
|
|
|
init="init scan name" |
(optional) |
|
|
|
|
function="function name" |
(optional) |
|
|
|
|
interpreter="interpreter name" |
(optional) |
|
|
|
|
level="0" |
(optional) |
|
|
|
|
nested="true" |
(optional) |
|
|
|
|
get_real_tag |
(optional) |
|
|
|
|
PAR_X="par x name" |
(optional) |
|
|
|
|
DPAR_X="default value of PAR_X" |
(optional) |
|
|
|
> |
|
- Name Option
-
This is the name of the tag. For the
define tag it would be "define". For
a tag written <foobar> it would be "foobar".
For a close tag like </foobar> it would be "/foobar".
(But in normal cases you have not to use define a closing tag.)
- Type Option
-
There are two possible tag types. The "simple_tag" for a
single tag like
<foobar> , and "open_close_tag"
for a pair of tags.
Example:
<foobar>
jblasdv asgasdö avslkdnva vaksdnv
adsvasd ölasdb asbölas dvölnsb asöln
</foobar>
|
At a "open_close_tag" the text between the tags will be given to the
JavaScript function as first parameter and it's type will be the File type.
- Init Option
-
At this position you can define which init scan should be used
to execute this defined tag.
The default value is "user". This means that in normal cases
all user defined tags will be processed at the user scan.
It is not possible to use a builtin scan like "include" here.
- Function Option
-
The name of the JavaScript function that should be called.
If this Option is not set, the name of the tag will be used.
- Interpreter Option
-
The name of the interpreter that should be used.
- Level Option
-
The level of the define tag.
- Nested Option
-
Turns the nested Tag support on.
If the type of the tag is not an "open_close_tag" this option has no effect.
- Get_real_tag Option
-
If this flag is set the found tag will be given as the tag type to the JavaScript function.
- PAR_X and DPAR_X Option
-
If the get_real_tag is not set the option parsing will be done by the compiler.
but the compiler has to know which Options are required.
PAR_1=name means, that the Option "name" should be given to the function
as the first parameter.
PAR_2=email means, that the Option "eamil" should be given to the function
as the second parameter.
PAR_1_STRING=name means, that the Option "name" should be given to the function
as the first parameter and it should be interpreted as string.
PAR_1_TYPE=name means, that the Option "name" should be given to the function
as the first parameter and it should be interpreted as an internal type.
DPAR_1="me" means, that if the option of the first parameter, the "name" option
is not set, this default value should be used.
| |
|
This page was created by
King Leo
. Page generator was
Leo<HTML>
version
0.99.0
.
|