Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

extend is not working for me

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
limon
Smarty n00b


Joined: 10 Apr 2015
Posts: 2

PostPosted: Fri Apr 10, 2015 9:01 pm    Post subject: extend is not working for me Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Apr 10, 2015 10:09 pm    Post subject: Reply with quote

You claim the directory "correct", but you never said, which it is.
Back to top
View user's profile Send private message
limon
Smarty n00b


Joined: 10 Apr 2015
Posts: 2

PostPosted: Sat Apr 11, 2015 3:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat Apr 11, 2015 4:25 pm    Post subject: Reply with quote

Words are cheap.
Provide actual code.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP