Template inheritance?

SpOOnman
Joined: 16 Jan 2008

Template inheritance?

Posted:24 Sep 2008 (11:39 UTC)
I've came into this problem with upgrading BW to 2.0.2. I had modified about 10 templates. That's not many but they are spread between many directories inside modules. I had to search by date of last modification on server or diff my templates versus new 2.0.2 package.

I think that there should be some mechanism for making this update easy. Modifying layout is great, cascading CSS is great, but templates are not.

I have proposal solution to this. Stock templates are in their directories unchanged. But there exists directory with user-defined templates as a replacement - "template-packs"? Every time template is called BW decides either to take stock one or one from the customised pack. There can be also an option: use only default templates (to test new, unchanged release) or use other named-template-pack if properly named template exists instead.

For example if wiki site contains templates one.tpl two.tpl three.tpl four.tpl and desired template-pack is john BW uses:

(check - no custom ) -> ./wiki/templates/one.tpl
(check - custom exists) -> ./templates/john/wiki/two.tpl (but not ./wiki/templates/two.tpl)
(check - no custom ) -> ./wiki/templates/three.tpl
(check - custom exists) ->./templates/john/wiki/four.tpl (but not ./wiki/templates/four.tpl)
SpOOnman
Joined: 16 Jan 2008

Re: Template inheritance?

Posted:25 Sep 2008 (18:00 UTC)
It's already done but I didn't find it. Check wiki site how to create your own theme.
  Page 1 of 1  1 
Post
If you are already registered, please enter your login credentials.
Anonymous Post