Donnerstag, 12. März 2009

MediaWiki #if syntax

Whenever I work on our wiki I have to look up the #if syntax (esp. for the more complex cases) and just do not find the right page on mediawiki.org. So I use this page as my personal cheat sheet.javascript:void(0)

#if:
{{#if: | true | false}} → false
{{#if: string | true | false}} → true
{{#if: {{{TEMPLATEVAR|}}} | true | false}} → true if the TEMPLATEVAR has any value


#ifeq:
{{#ifeq: string1 | string2 | value if true (string1 == string2) | value if false (string1 != string2) }}
{{#ifeq:{{{TEMPLATEVAR|}}} | yes | ja | nein }}


The right page for documentation can be found here: http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions

1 Kommentar:

  1. Hi there! Do you know if they make any plugins to
    assist with Search Engine Optimization? I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very good success.

    If you know of any please share. Thank you!

    Also visit my page http://comoaumentarpeniano.com/

    AntwortenLöschen

Hinweis: Nur ein Mitglied dieses Blogs kann Kommentare posten.