RE:was : Intergrating HTML_treeXL with Smarty now: DHTML with java script

From: Date: Mon, 12 May 2003 22:44:24 +0000
Subject: RE:was : Intergrating HTML_treeXL with Smarty now: DHTML with java script
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9537@lists.php.net to get a copy of this message
Yes, thank you. That caused the PHP to be executed! However, it's still not right. I need to: Call a php script within my .tpl (I used the {include_php file=...} ) That PHP file outputs java script. The Java script produces a dynamic tree environment. What's happening now is, the java script appears to get interpreted into HTML. So, when I view source, I am getting HTML of a fixed tree structure, instead of the java script that produces a dynamic one. Anybody have any hints to how to get that {include_php} to just output the raw java script? I'm a little confused on how this is happening. Thank you! -- Ryan -----Original Message----- From: messju mohr [mailto:messju@lammfellpuschen.de] Sent: Monday, May 12, 2003 2:57 PM To: Ryan Allen Cc: smarty-general@lists.php.net Subject: Re: [SMARTY] Intergrating HTML_treeXL with Smarty On Mon, May 12, 2003 at 02:39:48PM -0700, Ryan Allen wrote: > > 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"} i don't know TreeMenuXL, but if you want to include php inside a smarty template you have to use {include_php} and not {include} (the latter is to include smarty-templates) HTH messju > 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 > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.general (#9537) next »