setElement("TITLE", "My First VOOT Page");
$myVoot->setElement("CONTENT", "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent lupta");
/* Or they can contain HTML Markup: */
$myVoot->setElement("FOOTER", "
\n");
/* And of course they can be populated by manipulating PHP variables: */
$links = array("VOOT Home Page" => "http://andy.greyledge.net/voot/index.php",
"PHP Home Page" => "http://php.net");
$navContents = "\n";
foreach(array_keys($links) as $title){
$navContents .= "\t- $title
\n";
}
$navContents .= "
\n";
$myVoot->setElement("NAVIGATION", $navContents);
/* Rendering the final page is easy: */
$myVoot->render();
/* If you want to save the page to a file instead of sending it to the browser,
* Just pass the desired file name to the render() method:
*
* $myVoot->render("/path/to/myvoot.html");
*
* The process running PHP must have write permissions
* for the specified directory.
*
* If your template contains executable PHP code, you need to make sure the
* object's evalOnRender property is set to TRUE in order to run it:
*
* $myVoot->setEvalOnRender(true);
* $myVoot->render();
*
* Any PHP code embedded in the template or your elements will be executed.
* Use this feature with caution, and never, EVER use it on user-submitted
* input without some sort of quarantine functionality; otherwise a nasty
* user could put some bad code into a form field:
*
* "
*
* Depending on what you're doing with the form data and your file
* permissions, your script could be made to delete itself.
*/
?>