0

I use the Mediawiki Page Forms extension to create pages and set their names with a »page name« parameter like

{{{info|page name=<My Template[Some property]>-<unique number;start=1>}}} (see here for details).

Is there a way to save that »unique number« into a Semantic MediaWiki property of the created page for later usage by SMW queries?

felleb
  • 23
  • 4

1 Answers1

1

You could do something like this if you have Extension:ParserFunctions installed

Add to your template:

{{#set:
|unique number={{#explode:{{PAGENAME}}|-|-1}} 
}}

this explodes the page name on '-' and takes the last part

See more on the PAGENAME magic word here: https://www.mediawiki.org/wiki/Help:Magic_words#Page_names

See more on the explode parser function here: https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#explode

IRA1777
  • 593
  • 3
  • 11
Robis Koopmans
  • 363
  • 1
  • 5