[dokuwiki] Re: COMMON_PAGE_FROMTEMPLATE event

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 31 Jan 2011 12:18:04 +0100

>> 1) use two events. keep the current event as is and wrap a second
>> event around the template loadin process
>
> I think this might be a bit confusing and will require all current
> plugins to be changed to use the new event.

No. all current plugins would continue to work just as is because we
just add an addtional event.

>> 2) modify the current event to not wrap around the replacement logic
>> but around the template loading process and have it set an event data
>> option that controls if the output should be parsed
>
> Perhaps that option could also be a callback so the plugin can add its
> own replacement function - but okay, that could also be done in the
> after handler. I also don't know if that would require more changes in
> the existing plugins, at least it would probably be easier to support
> both the current and the future behavior.

I like the option of a single event more. And since all plugins still
seem to make use of an obsolete event (HTML_PAGE_FROMTEMPLATE)
currently they need to be changed anyway. So I'd say we should modify
the event as suggested. Any objections?



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

Other related posts: