[dokuwiki] Re: Template Switching Action

  • From: "Gerry Weißbach" <gerry.w@xxxxxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: 1 Aug 2006 12:43:15 -0000

Am 1.8.2006 schrieb "Chris Smith" <chris@xxxxxxxxxxxxx>:

>Gerry Weißbach wrote:
>> I am aware about the fakt that the css.php and js.php are generated
>> without using lots of other wiki functions and therefore are dependent
>> on the $conf settings. I also know, that if I'd i.e. implement my code
>> to change this $conf into the local.protected.php it would work (I did
>> so for the older release) but I want a solution that is independent of
>> changing source code. Therefore I asked for an event which could easily
>> be implemented into the css.php
>>
>One of us seems to be missing the point.
>
>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.
>Then when css.php and js.php get called, they will look for the cached
>version of the cs & js for the new template.  If they don't find it,
>they'll generate a new one.  Because the cache name is dependent on the
>template name there is no way they will use the css/js from another
>template.

So far, so good.

>
>If you're underlying problem is you wish to use a "foundation template"
>which changes the "actual template", then I would leave conf['template']
>at the "actual template" value and modify the conf['template'] setting
>within dokuwiki to ensure your "foundation template" gets to do its stuff.
>

That is exactly what I want to do via the action Plugin. It works fine
for the layout, means I can trigger the event DOKUWIKI_START and change
my variable. The Session does the rest for me.

The Problem is, that: 1. the css.php does not use the Session and 2. the
css.php does never triggers any event so that it always calls the
$conf['template'] from local.php or dokuwiki.php (old problem). That
is what I'd need a change in.

>Personally, I'd be against adding events into cs & js generation, they
>should have to do as little work as possible.

I agree about that, but I also think that triggering one single event
could be done.

>
>Cheers,
>
>Chris
>--
>DokuWiki mailing list - more info at
>http://wiki.splitbrain.org/wiki:mailinglist
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: