[dokuwiki] Re: metadata clearing

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sun, 19 Nov 2006 03:58:59 +0000

Hi,

I have prepared a patch based on the earlier discussion. Before I send it through to Andi, I want to check a couple of things.

The key changes are,
- metadata created via the renderer will default to transient.
- metadata created by p_set_metadata() will default to persistent.
- PARSER_METADATA_RENDER event wrapped around metadata rendering process, the metadata renderer object is the event data.

Conversion from old metadata to the new format is automatic - it'll occur when the metadata is first read. The conversion process assumes all but the following keys are persistent:
- title
- description abstract
- description tableofcontents
- relation haspart
- relation references
- date valid
(These are all the keys that were cleared in the metadata renderer's document_start method)

There is no need to change any current code, either in DokuWiki or in plugins/templates - if the default behaviour is satisfactory.

Some questions:
- Are there any other keys in current metadata which should be considered transient? - There are now four metadata functions, one new one, p_read_metadata, may not belong in parserutils.php. Should there be a metadata.php? - should the new event use full metadata array (current & persistent) rather than the renderer object?

Cheers,

Chris


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

Other related posts: