|
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 |
mark1997 Smarty n00b
Joined: 02 Apr 2019 Posts: 1
|
Posted: Wed Apr 03, 2019 12:24 am Post subject: Unable to load template (Hosted site) |
|
|
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
but nothing works, is there way to include or extends a file from a document root ?? |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Fri Apr 05, 2019 1:39 am Post subject: |
|
|
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 |
|
|
|
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
|