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

Q about module-drive website and Smarty-templates

 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
cptnemo
Smarty Rookie


Joined: 09 Sep 2003
Posts: 24

PostPosted: Tue Sep 09, 2003 7:25 pm    Post subject: Q about module-drive website and Smarty-templates Reply with quote

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


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Tue Sep 09, 2003 7:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
cptnemo
Smarty Rookie


Joined: 09 Sep 2003
Posts: 24

PostPosted: Thu Sep 11, 2003 3:44 pm    Post subject: Reply with quote

Thanks, I eventually got it working, but I ran into some new problems... See http://www.phpinsider.com/smarty-forum/viewtopic.php?p=4708#4708.
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 -> Installation and Setup 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