Last change
on this file since 754 was
687,
checked in by ramonb, 11 years ago
|
- templatepower no longer supplied by new ganglia-web
|
-
Property svn:executable set to
*
|
File size:
753 bytes
|
Rev | Line | |
---|
[687] | 1 | <?php |
---|
| 2 | //This is an example script for serialized templates |
---|
| 3 | |
---|
| 4 | //You can ONLY use serialized templates when the included templates are always |
---|
| 5 | //the same (no dynamic includes). |
---|
| 6 | // |
---|
| 7 | //You should run a script like below if you changed one or more of the used |
---|
| 8 | //templates and run it only once. Do NOT run this script with each |
---|
| 9 | //browser request! |
---|
| 10 | |
---|
| 11 | require_once( "./mod.TPLSerializer.inc.php" ); |
---|
| 12 | |
---|
| 13 | $stpl = new TPLSerializer( "./tpmain.tpl", "./tpmain.stpl" ); |
---|
| 14 | $stpl->assignInclude("main", "./tptable.tpl"); |
---|
| 15 | $stpl->assignInclude("rows", "./tprow.tpl"); |
---|
| 16 | |
---|
| 17 | //create the file ./tpmain.stpl |
---|
| 18 | //IMPORTANT NOTE: make sure the target dir is writable by PHP |
---|
| 19 | $stpl->doSerialize(); |
---|
| 20 | |
---|
| 21 | //open useSerialized.php to see how to use the serialized template |
---|
| 22 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.