[dokuwiki] Proposal: make colorscheme and style of a template easily configurable

  • From: Giovanni Cangiani <giovanni.cangiani@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 25 Feb 2010 11:39:43 +0100

Hi All,
        I'd like to propose a simple patch to the system allowing the template 
developers to add a 'style' option to let the user select an alternative style 
within the same template. 

Thanks to the great mechanism for templates already in place, the 
implementation is trivial. 
As you know, a template is mainly composed of two parts: a main.php file that 
drives the creation of the page, and a style.ini file that sets the colors and 
selects the css files to use. 

The idea is that the template developer could provide the template with various 
alternative style.ini files called style_whatever1.ini, style_whatever2.ini 
etc. When the 'style' option is set for the template, dokuwiki will search for 
the corresponding style_selectedStyleName.ini and use that specific file or 
revert to the default style.ini if that is not found.

I think this would makes it much easier for the template developer to maintain 
the code. We could also avoid duplicate templates: "arctic" and "arctic_dark" 
("Modified version of the Arctic DokuWiki template with dark colours") could be 
the same template with two styles.

If you're interested, you can have a look to my patch 
here:http://github.com/multiscan/dokuwiki/commit/b3d90fcc83f5c14fe4ce7414118af80900245bb8


Best,
        giovanni [aka multiscan]


--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: