Extension:Metadata

The Metadata extension provides two very simple methods  and   to set and get metadata about any wiki page.

This is a general purpose extension and does nothing useful by itself. It's meant to be used by other extensions and pieces of code to set and get their own metadata.

The metadata is stored in a new database table.

Usage
To save a simple key-value pair for a given page ID, use the following code:

You can also set several key-value pairs at once, like so:

If a value for any of the keys already exists, it will be overwritten. Once set, you can retrieve the saved data for a given key with the following code:

You can also retrieve all the key-value pairs for a given page at once, like so: