File: |
index.tpl |
Role: |
Example script |
Content type: |
text/plain |
Description: |
index template file |
Class: |
plato
Template parsing engine |
Author: |
By Rick Hopkins |
Last change: |
Includes code for assigning filenames to variables for the plato_include method.
index.php
-----------
$pl->assign("header", "header.tpl");
index.tpl
-----------
{plato_include=header&type=tpl&ref=1}
ref=1 relates the plato_include=header to the header variable created in index.php
Also include code for setting a dynamic value to the _stateSel function call.
index.php
-----------
$pl->assign("state", array("selected" => "MI", "class" => "input"));
index.tpl
-----------
{plato_func=_stateSel&var=state&ref=1}
ref=1 relates the var=state to the state variable you created in index.php |
Date: |
20 years ago |
Size: |
1,246 bytes |
|
|
|