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

Unable to load template (Hosted site)

 
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
mark1997
Smarty n00b


Joined: 02 Apr 2019
Posts: 1

PostPosted: Wed Apr 03, 2019 12:24 am    Post subject: Unable to load template (Hosted site) Reply with quote

I have this code

Code:
 {extends "`$root`public\included_template\user\user_index_structure.tpl"}


where $root is https://www.scoa.org/SCOA/ is my site but i got a error saying that

Code:
Fatal error: Uncaught --> Smarty: Unable to load template 'https://www.scoa.org/SCOA/public/included_template/user/user_index_structure.tpl' in .....


i tried


    .../../../SCOA/
    /SCOA/


but nothing works, is there way to include or extends a file from a document root ??
Back to top
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Fri Apr 05, 2019 1:39 am    Post subject: Reply with quote

According to https://www.smarty.net/docs/en/resources.tpl the section "Templates from any directory", you need to specify a computer's filesystem path - not a URI.

So, you might try:
Code:
{extends "`$smarty.server.document_root`/public/included_template/user/user_index_structure.tpl"}
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