Page
Many different PAD parts together in one page.
- Line in _inits.pad / root
- Variable in _inits.php / abc/klm
- Line in _inits.pad / abc
- Variable in _inits.php / abc/klm
- Line in _inits.pad / abc/klm
- Variable in _inits.php / abc/klm
- Line in page.pad / abc/klm
- Variable in page.php / abc/klm
- XML 1 from _data / root
- XML 2 from _data / root
- Line in _tags/myTag.pad / abc
- Variable in _tags/myTag.php / abc
- Line for _function/Myfunction.php in abc/klm
- Line for _option/myOption.php in root
- Line for _scripts/myScript.sh root
- Line for _callbacks/myCallback in root
- Line in _include/myInclude.pad / root
- Variable in _include/myInclude.php / root
- Line in _lib/myLib.pad / abc/klm
- Variable in _lib/myLib.php / abc/klm
- Line in _exits.pad / abc/klm
- Variable in _exits.php / root
- Line in _exits.pad / abc
- Variable in _exits.php / root
- Line in _exits.pad / root
- Variable in _exits.php / root
Sequence of calls
Note that some values 'root/abc/klm/xyz' look incorrect. This comes because all inits/exits/page PHP sources are called before the rendering of the PAD templates start. The sequence is.
- /_inits.php
- /abc/_inits.php
- /abc/klm/_inits.php
- /abc/klm/xyz/_inits.php
- /abc/klm/xyz/page.php
- /abc/klm/xyz/_exits.php
- /abc/klm/_exits.php
- /abc/_exits.php
- /_exits.php
So it is possible (and in this example application it happens) that:
- <page>.php PHP code overwrites variables from the _inits.php PHP code
- the _exit.php files overwrites variabeles from <page>.php and _inits.php fPHP code
An earlier version of PAD did prevent this, but in reality it is handy, this way you can set for exampe a $title variable in the page PHP code that is used in the _inits.pad template.