[dokuwiki] Re: Template Switching Action

  • From: Gerry Weißbach <gerry.w@xxxxxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 01 Aug 2006 17:33:22 +0200

Chris Smith schrieb:

Gerry Weißbach wrote:
Am 1.8.2006 schrieb "Andreas Gohr" <andi@xxxxxxxxxxxxxx>:

Chris Smith writes:

Unless I have misunderstood, when you change the template, you
necessarily call doku.php. You're action plugin can sit in there and
happily work its magic on the template name in local.protected.php.
If I understood correctly he wants to change the template on a per user
basis (stored in the session) so modifying the config files is out of scope.


To solve this the css.php would either need to accept an additional
parameter to switch the template on the fly or we would need some plugin
event. I don't know what I dislike more.


Andi


Sorry about that ... I still hope its worth a though.

Gerry
There is another solution, a little hackish, but a solution nevertheless.

The config files are all php. Add your code to set $conf['template'] based on the session value (starting the session if necessary) there.


That is what I did with version 2006-03-09. But I do not like the idea of giving the plugin to somebody else with only little experience in programming to do these changes. Imo it should work out of the box.
Maybe I do not understand the event triggering thing in the deep, but is it so much a performance thing to trigger an event?


Gerry
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: