[Mediawiki-l] Cutting MediaWiki loose from wikitext

Jan Steinman Jan at Bytesmiths.com
Tue Mar 27 16:21:16 UTC 2012


> From: Daniel Kinzler <daniel at brightbyte.de>
> 
> I propose a pluggable handler system for different
> types of content, similar to what we have for file uploads. So, I propose to
> associate a "content model" identifier with each page, and have handlers for
> each model that provide serialization, rendering, an editor, etc.
> 
> The background is that the Wikidata project needs a way to store structured data
> (JSON) on wiki pages instead of wikitext.

The "pluggable" part sounds great, as long as it isn't JSON-centric. I could see a need for XML or even SQL adaptors.

It would be great if namespaces, subpages, or even regexp title matches could trigger a particular content rendering. For example, I have LOTS of pages that contain identical wikitext in order to access SQL data, using subpages:

{{plant used for|{{SUBPAGENAME}}}}

This simply fires off an identical template for each subpage, passing in the SUBPAGENAME, which then is used as a query term to display a page of structured data. For example:
	http://www.EcoReality.org/wiki/Plant_used_for/Adaptogen

I've also got LOTS of pages with "{{plant needs|{{SUBPAGENAME}}}}", "{{plant supplies|{{SUBPAGENAME}}}}", etc., not to mention pages like "{{annual harvest for|...}}" and "{{monthly harvest for|...}}".

I seem to have LOTS of templates whose name ends with "for" that take one argument and that display data. I've often thought "there should be an easier way..." I played with SMW for a bit, but couldn't easily bend it to my needs.

Is this the sort of use you had in mind?

----------------
Life isn't fair. It's just fairer than death, that's all. -- William Goldman
:::: Jan Steinman, EcoReality Co-op ::::







More information about the MediaWiki-l mailing list