Le dimanche 12 octobre 2008 à 20:40 +0100, Thomas Dalton a écrit :
http://meta.wikimedia.org/wiki/Help:ParserFunctions#.23titleparts: looks like what you need (you will need to install the parserfunctions extension if you haven't already - see mediawiki.org).
Hello,
I have already ParserFunctions installed.
It does not help.
Page http://meta.wikimedia.org/wiki/Help:ParserFunctions#.23titleparts says :
{{ #titleparts: pagename | n_of_segments | starting_from }}
returns n_of_segments slash-separated segments of pagename, starting from the specified starting segment.
They say "slash-separated segments" while I want the "main" title that is "pagename".
In other words suppose a page gives {{PAGENAME}} = "t:p/a/b" I would find n and s such that
{{ #titleparts: t:p/a/b |n|s}} gives "p"
There is no such example in both Help page.
Thanks for helping.
Francois Colonna