|
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 |
sarahfoxnz Smarty Regular
Joined: 11 Apr 2010 Posts: 76
|
Posted: Sun Jan 26, 2014 6:27 am Post subject: Central template archive |
|
|
Hello.
I have a 'main' header file as a PHP script loaded in my path directory.
I use the PHP smarty command to access it, though i think smarty templates will be much better to go.
I have multiple domains & one domain has multiple subdomains.
I do have my "master" smarty PHP scripts in a central directory & the
functions.inc.php
templates.inc.php
files in the directories of each domain/subdomain.
QUERY: Is there a way to create a central Smarty TEMPLATE directory that i can access from within the Smarty templates like any other template (without using PHP)
& usable / accessible from all / any subdomain I control ? |
|
Back to top |
|
sarahfoxnz Smarty Regular
Joined: 11 Apr 2010 Posts: 76
|
Posted: Sun Jan 26, 2014 7:42 am Post subject: Easy fix. |
|
|
i thought it wouldnt work, but the simplest / easiest method is the best
[code]{include file="/home/users/web/(USERNAME)/usr/SmartyTemplates/header.tpl"}[/code]
i just created a SmartyTemplates directory in my USR, and it seems to work. :)
Just got to convert my PHP code into Smarty code (also change basic HTML to XHTML)
I thought it wouldn't work outside the subdomain, but it does :) |
|
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
|