[dokuwiki] Re: Add some (non-persistent) Metadata

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 29 Aug 2007 09:43:24 +0200

Gunther Pilz writes:

Hello List!

I'd like to add some metadata to the metafile of each page. Before
pointing to the Meta plugin - that's not the way I wanted them to
implement (no additional page syntax).

The additional metadata, one string and one number should each be
displayed in an additional input field on the edit page.

So my question is, how to implement (could be 'hardcoded' - no need for
a plugin) this (best)?

My biggest problem at the moment is, that I do not understand, how the
metadata is handled, when saving a wikipage?

I'll need the additional metadata for some additional functions,
espacially for generating a menu.

If someone could help me, or give me a hint, that would be very kind
from you.

Metadata is usually created by "rendering" it using the metadata renderer. This means metadata is extracted from the page syntax. As this is not the way you want to go I suggest this:

Use an action plugin to

 * enhance the edit form
* get the additional input * store metadata in the persistent metadata using p_set_metadata

You need to store it in the persistent array to make sure it is not erased by the metadata renderer.

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

Other related posts: