Intergrating HTML_treeXL with Smarty
| From: | Ryan Allen | Date: | Mon, 12 May 2003 21:39:48 +0000 |
| Subject: | Intergrating HTML_treeXL with Smarty | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9535@lists.php.net to get a copy of this message | ||
Has anybody successfully integrated the HTML_TreeMenuXL with SMARTY?
(Web page:
http://www.chipchapin.com/WebTools/MenuTools/HTML_TreeMenuXL/
)
I'd like to just call the PHP directly in the template, but the server
(apache) gets confused and exits out of PHP mode once it see's a '>'
sign as in the following piece of code:
<HTML>
<?php
require_once("TreeMenuXL.php");
// Create the Menu object and the menu tree
$menu00 = new HTML_TreeMenuXL();
$nodeProperties = array("icon"=>"folder.gif");
$node0 = new HTML_TreeNodeXL("INBOX", "#", $nodeProperties);
......
once the server sees the ("icon"=> It interprets the rest as HTML. You
end up with a ugly dump of source code on your web page.
So I tried the include file directive in my template:
{include file="../treeTest.php"}
and even though the file is labeled as PHP, the server does not
interpret the file as PHP. Anybody have a trick or suggestion to get
the treeTest.php executed and displayed around all those awesome smarty
tags?
Thanks in advanced,
-- Ryan