Re: [SMARTY] output filters and XSL

From: Date: Wed, 21 Aug 2002 22:07:36 +0000
Subject: Re: [SMARTY] output filters and XSL
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5799@lists.php.net to get a copy of this message
On Wed, Aug 21, 2002 at 11:10:44PM +0200, olivier hericord wrote: > i've made a XSL class that take in argument: > -a XML file > -a XSL file (that will determine the kind of output to build from the > XML ...HTML or rtf or....) > > Now my XML files are generated by Smarty. > So i call my XSL class by an 'output filter' processing the XML file > generated by Smarty.... > > My problem is that the 'XSL' file is hard coded into the output > filter!!! > Why??? > Because i do not know how to give the output filter an argument!!!!! > > it would be so cool if i was able to write > > $smarty->load_filter('output', > 'xslt','XSL_template/resa.xsl'); // load > output filter named 'xslt' > where the 3rd is the path to my XSL file... you could assign a variable $smarty->assign('filter', 'resa.xsl') and then access $smarty->_tpl_vars['filter'] in your output-filter. this is not the cleanest way, since "_tpl_vars" is considered an "internal" variable, but it gets your job done. regards messju > PLEASE HELP ME!!! > > :)

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