[dokuwiki] Re: events and custom templates
- From: Chris Smith <chris@xxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 25 Apr 2006 09:15:17 +0100
Martin Tschofen wrote:
I'd like to cache/process the entire HTML code that get's spit to the browser.
Perhaps trigger an event just before a custom template runs and right
thereafter with access to the data that was collected. So for example
I could cache or parse the entire <html> structure without
reprocessing it. I can't do that with the existing events, can I?
...martin
You could use DOKUWIKI_STARTED and DOKUWIKI_DONE
In DOKUWIKI_STARTED activate output buffering - ob_start()
In DOKUWIKI_DONE retrieve and terminate output buffering, $output =
ob_get_clean();
As the event description for DOKUWIKI_DONE says, some DokuWiki execution
paths may result in early script termination without reaching
DOKUWIKI_DONE. The ones I know about are concerned with data saving, so
probably won't impact on what you are doing.
Cheers,
Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- References:
- [dokuwiki] events and custom templates
- From: Martin Tschofen
Other related posts:
- » [dokuwiki] events and custom templates
- » [dokuwiki] Re: events and custom templates
I'd like to cache/process the entire HTML code that get's spit to the browser. Perhaps trigger an event just before a custom template runs and right thereafter with access to the data that was collected. So for example I could cache or parse the entire <html> structure without reprocessing it. I can't do that with the existing events, can I?
...martin
- [dokuwiki] events and custom templates
- From: Martin Tschofen