Our current wiki makes significant use of subpages (nested to 6 levels in some places)
We use a hack on article.php so that the displayed name is just the last bit of the full name ie.
page/sub-page/sub-sub-page/sub-sub-sub-page
is displayed as
sub-sub-sub-page
This hack doesn't work with version 1.11.0 which I am testing, so I was thinking of attempting to write an extension, so that with any luck it would work with future releases (this will also remove the last hack I have on any standard includes)
I'm assuming that I would want to use one of the page rendering parser hooks one option appears to be ParserAfterTidy, this has been used for the Edit Section Link transform extension.
Can anyone let me know if this would be an effective approach to this.?
Thanks
John http://www.mediawiki.org/wiki/Extension:Edit_Section_Link_Transform
I'm sure you could learn what to do by looking at http://www.mediawiki.org/wiki/Extension:PageFunctions
On 10/22/07, John Moorhouse john.moorhouse@powys.gov.uk wrote:
Our current wiki makes significant use of subpages (nested to 6 levels in some places)
We use a hack on article.php so that the displayed name is just the last bit of the full name ie.
page/sub-page/sub-sub-page/sub-sub-sub-page
is displayed as
sub-sub-sub-page
This hack doesn't work with version 1.11.0 which I am testing, so I was thinking of attempting to write an extension, so that with any luck it would work with future releases (this will also remove the last hack I have on any standard includes)
I'm assuming that I would want to use one of the page rendering parser hooks one option appears to be ParserAfterTidy, this has been used for the Edit Section Link transform extension.
Can anyone let me know if this would be an effective approach to this.?
Thanks
John http://www.mediawiki.org/wiki/Extension:Edit_Section_Link_Transform
For a related task I changed the <title> rendering in the Skin. The snippet below puts the Wiki name before the page name in the title, adapting it to your problem should be straightforward.
Change in <Your_Skin>.php (based on Monobook):
From: <title><?php $this->text('pagetitle') ?></title> To: <title><?php preg_match("/^(.*) - (.*)$/", htmlspecialchars( $this->data['pagetitle'] ), $res); echo "{$res[2]} - {$res[1]}"; ?></title>
HTH, Boris
On 22-Oct-07, at 5:29 AM, John Moorhouse wrote:
Our current wiki makes significant use of subpages (nested to 6 levels in some places)
We use a hack on article.php so that the displayed name is just the last bit of the full name ie.
page/sub-page/sub-sub-page/sub-sub-sub-page
is displayed as
sub-sub-sub-page
This hack doesn't work with version 1.11.0 which I am testing, so I was thinking of attempting to write an extension, so that with any luck it would work with future releases (this will also remove the last hack I have on any standard includes)
I'm assuming that I would want to use one of the page rendering parser hooks one option appears to be ParserAfterTidy, this has been used for the Edit Section Link transform extension.
Can anyone let me know if this would be an effective approach to this.?
Thanks
John http://www.mediawiki.org/wiki/Extension:Edit_Section_Link_Transform
-- John Moorhouse
Website Development Officer The Gwalia, Ithon Road, Llandrindod Wells, Powys LD1 6AA
01597 82 7090 john.moorhouse@powys.gov.uk
Cyngor Sir Powys County Council www.powys.gov.uk
Mae'r e bost hwn ac unrhyw atodiad iddo yn gyfrinachol ac fe'i bwriedir ar gyfer y sawl a enwir arno yn unig. Gall gynnwys gwybodaeth freintiedig. Os yw wedi eich cyrraedd trwy gamgymeriad ni ellwch ei gopio, ei ddosbarthu na'i ddangos i unrhyw un arall a dylech gysylltu gyda Cyngor Sir Powys ar unwaith.
Mae unrhyw gynnwys nad yw'n ymwneud gyda busnes swyddogol Cyngor Sir Powys yn bersonol i'r awdur ac nid yw'n awdurdodedig gan y Cyngor.
This e mail and any attachments are confidential and intended for the named recipient only. The content may contain privileged information. If it has reached you by mistake, you should not copy, distribute or show the content to anyone but should contact Powys County Council at once.
Any content that is not pertinent to Powys County Council business is personal to the author, and is not necessarily the view of the Council.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Never mind my last post: we are speaking of different "titles". B.
On 22-Oct-07, at 5:29 AM, John Moorhouse wrote:
Our current wiki makes significant use of subpages (nested to 6 levels in some places)
We use a hack on article.php so that the displayed name is just the last bit of the full name ie.
mediawiki-l@lists.wikimedia.org