On Sonntag, 20. April 2008, Nikola Smolenski wrote:
On Sunday 20 April 2008 18:54:55 Mediawiki wrote:
is there a way to store general information in a template and access parts of that information by a conditional call of the template?
An example could be a list of first name and surname of people working in defined positions in different departments. A template call to find out the Surname could then look like this
{{People_Info
|Department=DepartementA |Position=Accountant |Surname}}
where DepartementA and Accountant define which surname has to be displayed.
I tried a lot with the parser functions #if and #ifeq but the result is not really satisfying.
You may try http://meta.wikimedia.org/wiki/Semantic_MediaWiki or http://www.mediawiki.org/wiki/Extension:Data .
Templates in Semantic MediaWiki are often combined with something like #ifeq to make parameters optional, which yields the infamous MediaWiki template mess of nested {{ }}. For examples that can be copied and pasted, see e.g. the templates on semanticweb.org (such as Template:Person).
-- Markus
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l