Jump to content

Topic on Project:Support desk

Category Page - Change How Page Names Are Displayed

5
Kyocera Timms (talkcontribs)

Hi There,


I work for a company that uses MediaWiki as their knowledgebase.


I have to have a main page per client, however, on the category page it shows the full page name instead of just the name after client name.


For example,


On the category page it shows Annodata:Main Page as that's the page name, I'd like it to show just Main page and not Annodata.\


Hope you Can help,

James x

MarkAHershberger (talkcontribs)

Could you clarify what you're trying?

Do you have an "Annodata" namespace? Or are these pages in the main namespace that just have the "Annodata:" prefix?

Kyocera Timms (talkcontribs)

Hi Mark,


I am rebuilding the wiki that my employer uses as it was structured horribly, so I'm not sure exactly what they have set up. I'm still learning Wiki myself.


I have set up numerous Categories. For Example, The "Clients" Category which then contains the "Annodata" sub-category, which will then contain all of the pages previously made for Annodata client (I am currently in the process of categorizing everything as they didn't do so and the wiki was extremely random)


I'm going to provide a screenshot of a category page for the client "Smit & Dorlas", as this shows more of what I mean. Screenshot

As you can see the page names are "Smit & Dorlas:Main Page", "UCC: Creating a UCC DA Account" & "UCC: Full AX Guide". I need this to be "Main Page", "Creating a UCC DA Account" & "Full AX Guide". I cannot simply remake the page with the name "Main Page" as there are numerous duplicate page names in clients.

Hope this clarifies for you.

@MarkAHershberger

AhmadF.Cheema (talkcontribs)

Since you apparently want to have multiple Wiki pages with the (displayed) title "Main page" for each of your clients, as far as I know, there are two possible ways.

Either use Extension:Display Title. I have tested it and the extension appears to be working fine.

Upload the extension, append the following to your LocalSettings.php:

wfLoadExtension( 'DisplayTitle' );
$wgAllowDisplayTitle = true;
$wgRestrictDisplayTitle = false;

On your Wiki's Smit & Dorlas:Main Page, add the following: {{DISPLAYTITLE:Main Page}}. Perform a Null edit on the page to update the categories page and see if the category page changes as expected.

Or, define separate namespaces for each of your clients and hope one of the following old solutions to hide namespace prefixes from category pages still work:

Kamalabmi (talkcontribs)

@AhmadF.Cheema Thank you for providing this response, but none of the extension solutions worked. In my case, I am trying to migrate a wiki from a much older version to a new version by installing the extensions and then doing an XML import of the data from the older wiki. The old wiki does not have the problem of displaying the category as a prefix, but the new one does after the XML import. Should I have "Extension:Display Title" installed prior to the import? Does the order of XML import and extension installation matter?

Reply to "Category Page - Change How Page Names Are Displayed"