XSLT as templating instead the normal view |
[eluser]nadavvin[/eluser]
Hello I want to use XSLT as the templates since is a wide use standard. I expanded the Loader class but from some readon is not load the XSLT file: Code: <?php
[eluser]louis w[/eluser]
This might help you a little. This is an excerpt from a cms i did which used xslt as the views. This i not CI code, but can be adapted for your use: $params['xml'] should be an xml string $params['xsl'] should be the path to an xsl stylesheet Hope this helps. Code: $xh = xslt_create(); PS: This is php5 only code. If you need php4 let me know, you would have to use sablotron instead of the built in transformer.
[eluser]nadavvin[/eluser]
It's a PHP 4 code not PHP5 http://il2.php.net/xslt_create "(PHP 4 >= 4.0.3)"
[eluser]nadavvin[/eluser]
I got the following error: Code: An Error Was Encountered I want to place the XSLT files where the view folder. Where is search the file? Why is it not search from the view folder if it base on the same code of the view loader code?
[eluser]xwero[/eluser]
I can understand why you want to use XSLT for templating, it's very powerful and you don't have to add php code to the template but i wonder about the benchmarks. Is it faster or equal to php templating?
[eluser]louis w[/eluser]
Your right, that was my php4 code, not the version for 5. I believe that it searches off the include path for the file. You will need to put your view folder into the include path, or base it off a location already in there. |
Welcome Guest, Not a member yet? Register Sign In |