mediawikimediawiki-templatessemantic-mediawiki

Semantic MediaWiki Get page links?


I have a page set up as a disambiguation page inside of Category:Disambiguations that looks like this:

'''Sword''' may refer to one of the following:

* {{Link|Item|Blue Sword}}
* {{Link|Item|Yellow Sword}}
* {{Link|Item|Green Sword}}

Is there a way I can use the '#ask' function to get all of the links on that page? This page has no properties on it...

Thanks,


Solution

  • You could redefine the {{Link}} template to include [[Links to::{{{2}}}]] and declare Property:Links to of the type page. Then you will be able to query the links with {{#show:Sword|Links to}} or {{#ask:[[-Links to::Sword]]}}.