Jump to content

Topic on Project:Support desk/Flow

Searching for specific template fields

2
RasgarBlue (talkcontribs)

I would like to create page that users on my wiki could use to search for specific data that has been entered into a template field.

Say for example there is a template which displays character information:

{{Infobox Character
 |name          = Bob
 |eyes          = blue
 |hair          = brown
 }}
 

What I want to do is create a search function that would search all pages that use the Infobox Character template, based on what is entered into one of the fields. For example, a search that would result in a list of all characters with blue eyes (ie, every page that has "blue" in the "eyes" field).

Is something like this possible?

193.56.33.6 (talkcontribs)

Yes it is possible, you will have to use some extensions.

Have a look at the Semantic MediaWiki extension or the Cargo extension to add your properties like "blue eyes" and create search functions.

SMW : Extension:Semantic MediaWiki

Cargo : Extension:Cargo


Then use the Page forms extension (if you want) to create forms which will be used in different manners :

Page forms : Extension:Page Forms


Good luck !