Welcome Guest, Not a member yet? Register   Sign In
Smarty in CodeIgnitor
#1

[eluser]blaff[/eluser]
Hello,

I have read some topics about including Smarty in CodeIgnitor. All of them seams to be very advanced so i tried to include it by my self. I did get the connection between CodeIgnitor and Smarty to work but the problem now is that Smarty can't find the tpl files.

This is how i did it:

1. Create the file srt.php in /application/libraries/.
2. Added Smarty folder in /application/libraries/smarty/.
3. Including Smarty class in srt.php
Code:
require("smarty/class.smarty.php");
4. Set correct dir to tpl folder
Code:
$this->template_dir = BASEPATH . '/application/views';

What have i done wrong, the message i get is "Unable to read resource"

Best regards,
Mikael
#2

[eluser]Tom Schlick[/eluser]
i have a fully fuctional smary libarary with integrated tag files and a way to load new tags. ive been thinking about packaging it up for a while i guess i will if someone would want it... does anyone want it?
#3

[eluser]blaff[/eluser]
Yes, please!
#4

[eluser]Tom Schlick[/eluser]
ok ill throw something together. its not the prettiest thing but it definatly works and works well. give me a little while and ill post it
#5

[eluser]blaff[/eluser]
I solved this problem!




Theme © iAndrew 2016 - Forum software by © MyBB