Erweiterung:UrlGetParameters

From mediawiki.org
This page is a translated version of the page Extension:UrlGetParameters and the translation is 27% complete.
MediaWiki-Erweiterungen
UrlGetParameters
Freigabestatus: stabil
Einbindung Parser-Funktion
Beschreibung Provides a parser function {{#urlget:...}} which allows access to the URL parameters in your page.
Autor(en) S.O.E. Ansems
Letzte Version 1.6.0 (2021-04-16)
MediaWiki 1.35+
Datenbankänderungen Nein
Lizenz GNU General Public License 2.0 oder neuer
Herunterladen
  • $wgUrlGetParametersSeparator
Quarterly downloads 17 (Ranked 125th)
Übersetze die UrlGetParameters-Erweiterung, wenn sie auf translatewiki.net verfügbar ist
Vagrant-Rolle urlgetparameters

The UrlGetParameters extension enables you to use and/or display the "GET" parameters of the URL, i.e. the query string, on the wiki page.

Installation

  • Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens UrlGetParameters im Ordner extensions/ ablegen.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/UrlGetParameters
  • Folgenden Code am Ende deiner LocalSettings.php -Datei einfügen:
    wfLoadExtension( 'UrlGetParameters' );
    
  • Yes Erledigt – Zu Special:Version in dem Wiki (bei Einstellung auf deutsch nach Spezial:Version) navigieren, um die erfolgreiche Installierung der Erweiterung zu überprüfen.

Verwendung

Caching for the page you use this extension on should be disabled.

To display the value of a URL get parameter in your page, you might do this:

{{#urlget:parameter-name}}

Where parameter-name is the name of the parameter whose value you want. If the parameter is not found, the extension will result in nothing. Alternatively, you can also specify a default value as follows:

{{#urlget:parameter-name|default-value}}

When the parameter parameter-name is not available, then the value default-value is returned.

If the URL contains parameters of the form "A[B]=C", you can display the value "C" in a similar way, by calling:

{{#urlget:A[B]}}

Autoren

This extension was written by S.O.E. Ansems. Important contributions were made by Ankit Garg and some anonymous editors.