Help talk:Tips for working with prefixes

Add topic
From Wikimedia Incubator
Latest comment: 15 years ago by MF-Warburg in topic How ?

How ?[edit source]

How can one extract something from the name of a page ? Here we have – we are in ! – « http://incubator.wikimedia.org/wiki/Wx/xxx/XXXXX » :

  • {{PAGENAME}} gives « Wx/xxx/XXXXX » ;
  • {{BASEPAGENAME}} gives « Wx/xxx » (text to last « / ») ;
  • {{SUBPAGENAME}} gives « XXXXX » (text from last « / »).

I can't find a tip to extract the very beginning of the page, e. g. only « Wx », something as

  • {{HEADPAGENAME}}/{{TOPPAGENAME}} = « Wx » (text to the first « / »).

Thanxies,

Budelberger 01:38, 20 January 2009 (UTC) ().Reply

It seems such a variable doesn't exist. --MF-W {a, b} 16:37, 21 January 2009 (UTC)Reply