Opened 12 years ago

Closed 12 years ago

#618 closed enhancement (wontfix)

Improved theming override

Reported by: Tumulte Owned by:
Priority: major Milestone:
Component: programming Keywords:
Cc: Parent Tickets:

Description (last modified by Christopher Allan Webber)

This is (almost) the part 2 of the previous ticket.

If the template override system is to be modified, I believe it'd be a great idea to allow multiple themes and a customizable override order :

That would allow someone to make small design enhancement/mods without having to build a whole theme (perfect for plugins).

You would have to add those lines in the ini :

#the main theme
theme_base=base

#optional themes, each one override the previous one - that overide the base theme
theme[0]=my_theme
#if someone has made a theme for devices with screens smaller than 320px :
theme[1]=phone_theme
# some plugins would require to have this line added to the ini
plugin_theme[2]=my_plugin_1

That'd make theme and plugins way more flexible whith, at all time, a clean basic theme.

Change History (3)

comment:1 by Tumulte, 12 years ago

(this was a test by cwebber's request, removed by cwebber)

Last edited 12 years ago by Christopher Allan Webber (previous) (diff)

comment:2 by Christopher Allan Webber, 12 years ago

Description: modified (diff)

comment:3 by Christopher Allan Webber, 12 years ago

Resolution: wontfix
Status: newclosed

You can do this in a very minimal way at present, I believe (I haven't tested it though). If I remember correctly, you can set the order of templates in the config like so:

[plugins]
[[first.plugin]]
[[second.plugin]]
[[third.plugin]]

... in this case, third.plugin will take precedence.

This isn't as flexible as the situation you described above, but I think at the moment this is a bit of premature optimization. It could result in very messy configs... and if you have a strong preference for a particular template to override on your install, you could set it up in your "local" template listing. (user_pages/templates/ by default iirc)

I appreciate the idea though... If we need something like this in the future I might be open to rediscussing it, but for now I think this would add too much mess.

Note: See TracTickets for help on using tickets.