Extension:PageProperties

Other languages:
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
PageProperties
Release status: stable
Implementation Hook , Special page
Description Allows to easily edit display title, language and content model of a page. To associate semantic properties to pages without having to manually annotate them (provided that Semantic MediaWiki is installed), and to set SEO meta data for the entire wiki or specific pages
Author(s) (thomas-topway-ittalk)
Latest version 1.0.1 (2022-02-15)
MediaWiki >= 1.35.0
License GNU General Public License 2.0 or later
Download
Translate the PageProperties extension if it is available at translatewiki.net

Check usage and version matrix.

PageProperties allows to easily edit display title, language and content model of a page. To associate semantic properties to pages without having to manually annotate them (provided that Semantic MediaWiki is installed), and to set SEO meta data for the entire wiki or specific pages.

The extension adds an action on the top menu of Wiki articles and then authorized users can set all the relevant properties of the page.

PageProperties-screenshot-menu.png

InstallationEdit

  • Download and place the file(s) in a directory called PageProperties in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php
wfLoadExtension( 'PageProperties' );
  • Run php maintenance/update.php (this will install the required tables)
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

FeaturesEdit

MainEdit

From the main tab you can edit the display title of the page, language and content model. The display title can be left blank to hide the title completely without having to deal with css tricks.

 


Semantic propertiesEdit

From the Semantic properties tab you can register semantic properties to the related page without annotating them manually. Same properties can have multiples values, and they will be handled correctly by askqueries and shown on the FactBox. (see #Known issues for further details)

The list of available semantic properties includes, in order to prevent inconsistencies, all user-defined semantic properties which are not already annotated in the page, plus all annotable and non-declarative SMW's special properties.

 

 


SEOEdit

 

From the SEO tab you can easily add meta tags or properties to specific pages or the entire wiki.

If the extension Extension:wikiSEO is installed, PageProperties will show a combobox with the parameters allowed by the extension, and they will be internally handled by the WikiSEO extension itself without the need to manually annotate them on the page.

Note that the checkbox "apply to entire wiki" will be only shown if the properties are related to the Main Page of the wiki.

 

ConfigurationEdit

$wgPagePropertiesAuthorizedEditors controls users and groups allowed to edit page properties. Place in LocalSettings.php as follows to allow all logged-in users to edit page properties. By default only sysops are allowed. The list accepts both usernames and groups.

$wgPagePropertiesAuthorizedEditors = [ 'user' ];

If SemanticMediaWiki is not installed the extension works as expected and the "Semantic properties" tab will be omitted.

If WikiSEO is not installed the extension works as expected and the SEO meta tag or properties have to be entered using their complete syntax. For instance article:author instead of author and og:title instead of title.

Known issuesEdit

SMW's factbox may not display the properties set from the extension (while they will be handled correctly by askqueries). You can monitor the state of the ticket on Github.

Before the issue is solved just edit the function fetchContent in the file extensions/SemanticMediaWiki/src/Factobox/Factbox.php as below

// ***edited
		if ( true || $semanticData === null || $semanticData->stubObject || $this->isEmpty( $semanticData ) ) {
			$semanticData = $this->store->getSemanticData( $this->parserData->getSubject() );
		}

Also, the combobox of Mediawiki's OOUI library does not display optgroups correctly on menus (i.e. they will not show as in this picture). I will propose/commit a patch as soon as possible to the official library.


Support & bugsEdit

Please post error messages in the Talk page of the extension. Updates will be posted on the main MediaWiki mailing list mediawiki-l so we advice you to subscribe to the list to stay tuned with them.



See alsoEdit