PAD - PHP Application Driver


home | manual | reference | regression | sequence | develop | apps


Pages/properties

PHP
HTML
pages/properties.pad
Result
Tag properties give information about a tag, they can be used:

<p><table border=0>
<tr><td>- as a pad tag </td><td>{source}{first} ... {/first}{/source}</td></tr>
<tr><td>- as a variable with the & prefix &nbsp; </td><td>{source}{if &first} ... {/if}{/source}</td></tr>
</table>

{page 'properties/doc1'}

<p>When working with properties of a tag that is deeper in the stack of tags, the name of that tag must be given.

<p><table border=0>
<tr><td>- as parameter when used as tag</td></tr>
<tr><td>- as prefix, when used as &var</td></tr>
<tr><td>- relative level number</td></tr>
</table>

{page 'properties/doc2'}

<p>todo-1

{page 'properties/doc4'}

{fragment 'properties/_lib/lib'}
Tag properties give information about a tag, they can be used:

- as a pad tag {first} ... {/first}
- as a variable with the & prefix   {if &first} ... {/if}

HTML RESULT
{myContent1}
{staff}
<tr>
<td> {$name} </td>
<td> {first} X {/first} </td>
<td> {border} X {/border} </td>
<td> {middle} X {/middle} </td>
<td> {last} X {/last} </td>
<td> {even} X {/even} </td>
<td> {odd} X {/odd} </td>
</tr>
{/staff}
{/myContent1}
first border middle last even odd
joe X X X
jim X X
john X X
jack X X
jerry X X X
{myContent1}
{staff}
<tr>
<td> {$name} </td>
<td> {if &first} X {/if} </td>
<td> {if &border} X {/if} </td>
<td> {if &middle} X {/if} </td>
<td> {if &last} X {/if} </td>
<td> {if &even} X {/if} </td>
<td> {if &odd} X {/if} </td>
</tr>
{/staff}
{/myContent1}
first border middle last even odd
joe X X X
jim X X
john X X
jack X X
jerry X X X

When working with properties of a tag that is deeper in the stack of tags, the name of that tag must be given.

- as parameter when used as tag
- as prefix, when used as &var
- relative level number

HTML RESULT
{myContent1}
{staff}
{true}
<tr>
<td> {$name} </td>
<td> {first 'staff'} X {/first} </td>
<td> {border 'staff'} X {/border} </td>
<td> {middle 'staff'} X {/middle} </td>
<td> {last 'staff'} X {/last} </td>
<td> {even 'staff'} X {/even} </td>
<td> {odd 'staff'} X {/odd} </td>
</tr>
{/true}
{/staff}
{/myContent1}
first border middle last even odd
joe X X X
jim X X
john X X
jack X X
jerry X X X
{myContent1}
{staff}
{true}
<tr>
<td> {$name} </td>
<td> {if &staff:first} X {/if} </td>
<td> {if &staff:border} X {/if} </td>
<td> {if &staff:middle} X {/if} </td>
<td> {if &staff:last} X {/if} </td>
<td> {if &staff:even} X {/if} </td>
<td> {if &staff:odd} X {/if} </td>
</tr>
{/true}
{/staff}
{/myContent1}
first border middle last even odd
joe X X X
jim X X
john X X
jack X X
jerry X X X
{myContent1}
{staff}
{true}
<tr>
<td> {$name} </td>
<td> {first -2} X {/first} </td>
<td> {border -2} X {/border} </td>
<td> {middle -2} X {/middle} </td>
<td> {last -2} X {/last} </td>
<td> {even -2} X {/even} </td>
<td> {odd -2} X {/odd} </td>
</tr>
{/true}
{/staff}
{/myContent1}
first border middle last even odd
joe X X X
jim X X
john X X
jack X X
jerry X X X
{myContent1}
{staff}
{true}
<tr>
<td> {$name} </td>
<td> {if &-2:first} X {/if} </td>
<td> {if &-2:border} X {/if} </td>
<td> {if &-2:middle} X {/if} </td>
<td> {if &-2:last} X {/if} </td>
<td> {if &-2:even} X {/if} </td>
<td> {if &-2:odd} X {/if} </td>
</tr>
{/true}
{/staff}
{/myContent1}
first border middle last even odd
joe X X X
jim X X
john X X
jack X X
jerry X X X

todo-1

HTML RESULT
{myContent2}
{staff}
<tr>
<td> {$name} </td>
<td> {&name} </td>
<td> {&count} </td>
<td> {&key} </td>
<td> {&current} </td>
<td> {&done} </td>
<td> {&remaining} </td>
</tr>
{/staff}
{/myContent2}
name count key current done remain
joe staff 5 0 1 0 4
jim staff 5 1 2 1 3
john staff 5 2 3 2 2
jack staff 5 3 4 3 1
jerry staff 5 4 5 4 0
{myContent2}
{staff}
{true}
{true}
<tr>
<td> {$name} </td>
<td> {&-2:name} </td>
<td> {&-2:count} </td>
<td> {&-2:key} </td>
<td> {&-2:current} </td>
<td> {&-2:done} </td>
<td> {&-2:remaining} </td>
</tr>
{/true}
{/true}
{/staff}
{/myContent2}
name count key current done remain
joe staff 5 0 1 0 4
jim staff 5 1 2 1 3
john staff 5 2 3 2 2
jack staff 5 3 4 3 1
jerry staff 5 4 5 4 0
{myContent2}
{staff}
{true}
{true}
<tr>
<td> {$name} </td>
<td> {&staff:name} </td>
<td> {&staff:count} </td>
<td> {&staff:key} </td>
<td> {&staff:current} </td>
<td> {&staff:done} </td>
<td> {&staff:remaining} </td>
</tr>
{/true}
{/true}
{/staff}
{/myContent2}
name count key current done remain
joe staff 5 0 1 0 4
jim staff 5 1 2 1 3
john staff 5 2 3 2 2
jack staff 5 3 4 3 1
jerry staff 5 4 5 4 0


This manual page uses below PAD fragment.
{content 'myContent1'}
<table border=1 valign=center>
<tr>
<th> </th>
<th> first </th>
<th> border </th>
<th> middle </th>
<th> last </th>
<th> even </th>
<th> odd </th>
</tr>
@content@
</table>
{/content}

{content 'myContent2'}
<table border=1>
<tr>
<th> </th>
<th> name </th>
<th> count </th>
<th> key </th>
<th> current </th>
<th> done </th>
<th> remain </th>
</tr>
@content@
</table>
{/content}




home | manual | reference | regression | sequence | develop | apps

(c) 2003-2025 Herbert Groot Jebbink