Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Editing sidebar

From Wikven
More actions

The navigation sidebar is configured the same way as on MediaWiki, through the MediaWiki:Sidebar system message. Create a MediaWiki:Sidebar.wikitext file in your source directory, alongside your other pages.

Each top-level * line is a heading, and each ** line below it is a link written as page|label. Headings and labels are looked up as system messages first and only fall back to the literal text when no such message exists, so mainpage and mainpage-description resolve to the main page and its label. Write your own as message names too, because a message is what makes a label translatable: the English wording goes in MediaWiki:Sidebar-docs.wikitext and the Korean in MediaWiki:Sidebar-docs/ko.wikitext, next to your other pages. A sidebar then reads like this:

* navigation
** mainpage|mainpage-description
* sidebar-docs
** Getting Started|sidebar-getting-started
** Images|sidebar-images
* sidebar-references
** Configuration|sidebar-configuration

A link target is looked up as a message too, and an entry whose target resolves to a message reading - is dropped from the sidebar without a trace. MediaWiki defines licenses, the upload form's list of license options, as -, so a page named Licenses disappears when written as a plain target. Prefix such a target with a colon, as in :Licenses, to link the page itself.

Linking on a translated site

A target names one page, so an entry leads to that page and no other: a reader on a translated page follows the sidebar back into the source language. Write the target as Special:MyLanguage/Page, the way MediaWiki's own wikis do, and the build resolves it per page instead. On a page in a given language the entry links to that language's translation of the target, and to the source page where there is none. The prefix also keeps a target out of the message lookup above, so Licenses needs no colon here:

* navigation
** mainpage|mainpage-description
* sidebar-docs
** Special:MyLanguage/Getting Started|sidebar-getting-started
** Special:MyLanguage/Images|sidebar-images
* sidebar-references
** Special:MyLanguage/Licenses|sidebar-licenses

The main page keeps its plain mainpage entry, because that target is a message: the prefix goes in the message instead. Write Special:MyLanguage/index in MediaWiki:Mainpage.wikitext (index being whatever WikvenMainPage names), as Meta-Wiki does. Every skin points its logo at that same message, so the logo follows the reader's language too. The cost is that the wiki stops recognising the page as its main page: the page title shows in the browser tab, and MinervaNeue leaves out its main-page styling.

What is removed

Some default sidebar blocks need a live wiki, so Wikven drops them from the static export: the toolbox (What links here, Special pages, Printable version, and so on) and the search box. The navigation blocks you define in MediaWiki:Sidebar are kept as written.

See also

← Pages
Images →
Retrieved from "Editing_sidebar/en.html"