Re: [SMARTY] {literal}{/literal} and {ldelim}{rdelim}

From: Date: Fri, 18 Apr 2003 12:51:31 +0000
Subject: Re: [SMARTY] {literal}{/literal} and {ldelim}{rdelim}
References: 1 2  Groups: php.smarty.general php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9316@lists.php.net to get a copy of this message
Matthias Mohr wrote: >> -------------------------------------------------------------------------------------------------------------- >> require_once( 'Smarty.class.php' ); >> >> $smarty = &new Smarty(); >> $smarty->left_delimiter = '<{'; >> $smarty->right_delimiter = '}>'; >> -------------------------------------------------------------------------------------------------------------- >> Or you make your own Smarty-Class which extends the original one and sets >> the delimiters in the constructor. >> BTW, I find '<{' and '}>' a good alternative for the delimiters, because they don't >> interfere with javascript, look similar to the original delimiters and also look like >> HTML-tags for graphical editors... I have a similar problem. I've downloaded a nice php script (phpMerlin), which generates a javascriptmenu like: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <?php class ... ?> <script language="JavaScript"> var sub_top = <? $phpMerlin_top;?>; var x = 0; var y = 0; var x1 = 0; var y1 = 0; var x2 = 0; var y2 = 0; var sel = 0; var temp; <? /** DO THIS STUFF WHEN WE ARE USING OPERA */ if ($browser == "op") { for ($i=0; $i<=$Maxmenu; $i++) { echo "document.all['subMenu$i'].onmouseover=handlerMM;"; echo "document.all['subMenu$i'].onmouseout=handlerMM;"; } ?> function handlerMM(e){ if(!e)e=window.event; if(e.type=="mouseover")mouse=true; else{ mouse=false; setTimeout("hideMenu()",100) } } function showMenu(x){ eval('document.all["subMenu'+sel+'"].style.visibility="hidden"'); sel = x; eval('document.all["subMenu'+sel+'"].style.visibility="visible"'); } function hideMenu(){ if(!mouse){ eval('document.all["subMenu'+sel+'"].style.visibility="hidden"');} } eval('document.all["phpMerlinMenu"].style.visibility="visible"'); <? /** INTERNET EXPLORER CODE */ } elseif($browser == "ie") {?> I want to include this php File my template with "include_php file=", but the smarty engine generate only till the var definitions. The rest will be ignored :(. Is there any suggestion to solve this problem? Thanks a lot. Kai

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