|
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 |
cptnemo Smarty Rookie
Joined: 09 Sep 2003 Posts: 24
|
Posted: Tue Sep 09, 2003 7:25 pm Post subject: Q about module-drive website and Smarty-templates |
|
|
Hello there,
I'm in the process of building a module-based website, with each module living in it's own subdir, together with it's templates and everything.
For instance, for module Foo, it's directory would be 'mods/foo/', with it's template in 'mods/foo/templates/'.
How can I tell Smarty to look for that template in that dir? I have the module dir in a var, relative from the site's root directory. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Sep 09, 2003 7:55 pm Post subject: |
|
|
Someone else may have a better idea but to get you started:
i) you can register your mods directory as your template dir. Then your mods would call templates via sth like "foo/templates/blah.tpl".
ii) you can create a custom resource which encodes your path characteristics allowing you to call your templates with a prescribed syntax, eg: "mod:foo/blah.tpl". The resource would then map this request to the appropriate location. |
|
Back to top |
|
cptnemo Smarty Rookie
Joined: 09 Sep 2003 Posts: 24
|
|
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
|