|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
limon Smarty n00b
Joined: 10 Apr 2015 Posts: 2
|
Posted: Fri Apr 10, 2015 9:01 pm Post subject: extend is not working for me |
|
|
I don't know why this time extend is not working. I'm using Codeigniter..and when I want to call a base template from another one, it just don't load it.
Here's my example code:
//views/base/base.tpl
<html> hello {block name=content}{/block} </html>
//views/child.tpl
{extends file='base/base.tpl'}
{block name=content}I'm the child of base template{/block}
In my php I tried:
print_r($this->smartyci->template_dir);die();
And template directory is correct, so i think It's not a path issue.
In php error log file there´s no error also.
why is extend not working? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Apr 10, 2015 10:09 pm Post subject: |
|
|
You claim the directory "correct", but you never said, which it is. |
|
Back to top |
|
limon Smarty n00b
Joined: 10 Apr 2015 Posts: 2
|
Posted: Sat Apr 11, 2015 3:32 pm Post subject: |
|
|
AnrDaemon wrote: | You claim the directory "correct", but you never said, which it is. |
I'm using Codeigniter, so the directory is:
http://local.new_admin/site/application/views/
inside views I have another folder /base which contains all basic templates like the main one, the one with the header, sidebar and so on...
other templates that are not the base ones, are on /views/ folder |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Apr 11, 2015 4:25 pm Post subject: |
|
|
Words are cheap.
Provide actual code. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|