|
home | manual | reference | regression | sequence | develop | apps |
The content tag
With the {content} tag it is possible to define content for later use.
HTML RESULT {content 'hello'}
<p> Hello World </p>
{/content}{hello}
{hello}
{hello}
Hello World
Hello World
Hello World
Open or close tag
If {content 'xxx'} is used, then the content will not be processed before it is stored in the content store
If {/content 'xxx'} is used, then the content will be processed before it is stored in the content store
HTML RESULT {set $abc = 10}
{content 'myContent'}
{$abc} <br>
{/content}{increment $abc} {myContent}
{increment $abc} {myContent}
{increment $abc} {myContent}11
12
13
{set $abc = 10}
{content}
{$abc} <br>
{/content 'myContent'}{increment $abc} {myContent}
{increment $abc} {myContent}
{increment $abc} {myContent}10
10
10
Merge content with content - part 1
HTML RESULT {content 'myContent'}
This is my content.<br>
{/content}{myContent}This is my content.
{myContent}
This is the base content. <br>
{/myContent}This is my content.
This is the base content.
{myContent merge='replace'}
This is the base content. <br>
{/myContent}This is my content.
{myContent merge='top'}
This is the base content. <br>
{/myContent}This is my content.
This is the base content.
{myContent merge='bottom'}
This is the base content. <br>
{/myContent}This is the base content.
This is my content.
Merge content with content - part 2
HTML RESULT {content 'myContent'}
Before <br>
@content@
After <br>
{/content}{myContent}
This will be inserted <br>
{/myContent}Before
This will be inserted
After
HTML RESULT {content 'myContent'}
This will be inserted <br>
{/content}{myContent}
Before <br>
@content@
After <br>
{/myContent}Before
This will be inserted
After
Merge content with content - part 3
HTML RESULT {content 'myContent'}
This is the true content. <br>
@else@
This is the false content. <br>
{/content}{true content='myContent', merge='replace'}
This is the true base content <br>
@else@
This is the false base content <br>
{/true}This is the true content.
{true content='myContent', merge='top'}
This is the true base content <br>
@else@
This is the false base content <br>
{/true}This is the true content.
This is the true base content
{true content='myContent', merge='bottom'}
This is the true base content <br>
@else@
This is the false base content <br>
{/true}This is the true base content
This is the true content.
{false content='myContent', merge='replace'}
This is the true base content <br>
@else@
This is the false base content <br>
{/false}This is the false content.
{false content='myContent', merge='top'}
This is the true base content <br>
@else@
This is the false base content <br>
{/false}This is the false content.
This is the false base content
{false content='myContent', merge='bottom'}
This is the true base content <br>
@else@
This is the false base content <br>
{/false}This is the false base content
This is the false content.
Merge content with content - part 4
PHP HTML RESULT <?php
function myFunction () {
return 'This is the tag content <br>';
}
?>{content 'myContent'}
This is content from the {content} tag <br>
{/content}{myFunction content='myContent', merge='replace'}
This is the base content <br>
{/myFunction}This is content from the {content} tag
{myFunction content='myContent', merge='top'}
This is the base content <br>
{/myFunction}This is content from the {content} tag
This is the tag content
This is the base content
{myFunction content='myContent', merge='bottom'}
This is the base content <br>
{/myFunction}This is the base content
This is the tag content
This is content from the {content} tag
Merge content with content - part 5
HTML RESULT {content 'myContent'}
true: This is the @content@ content. <br>
@else@
false: This is the @content@ content. <br>
{/content}{true content='myContent'}
true
@else@
false
{/true}true: This is the true content.
{false content='myContent'}
true
@else@
false
{/false}false: This is the false content.
HTML RESULT {content 'myContent'}
true
@else@
false
{/content}{true content='myContent'}
true: This is the @content@ content. <br>
@else@
false: This is the @content@ content. <br>
{/true}true: This is the true content.
{false content='myContent'}
true: This is the @content@ content. <br>
@else@
false: This is the @content@ content. <br>
{/false}false: This is the false content.
Basic Concepts
Advanced concepts
Constructs
Miscellaneous
|
home | manual | reference | regression | sequence | develop | apps |
(c) 2003-2025 Herbert Groot Jebbink