Changes

Jump to navigation Jump to search
no edit summary
Line 99: Line 99:     
One property that is not on the Weller is the [Property:Has certification], as this is done on the [Soldering Irons] page. Most equipment should have this as it is a link to the certification URL (typically a FoxTale course).
 
One property that is not on the Weller is the [Property:Has certification], as this is done on the [Soldering Irons] page. Most equipment should have this as it is a link to the certification URL (typically a FoxTale course).
 +
 +
=== Equipment Queries ===
 +
The current incantation of [[Machine Shop]] has a couple of queries. The first is straightforward. It looks like this:
 +
<nowiki>
 +
{{#ask:
 +
  [[Is equipment::True]]
 +
  [[Is located in facility::Machine Shop]]
 +
  |format=Category
 +
}}</nowiki>
 +
 +
This is looking for pages that are marked as equipment and located in the Machine Shop. The format lines says to present it in category format. The category format could be replaced with other options, such as ordered or unordered lists. See the [[https://www.semantic-mediawiki.org/wiki/Help:Inline_queries#Parser_function_.23ask Semantic Mediawiki Ask] documentation for explanations.
 +
 +
The second one is a little more complicated. It looks like this:
 +
<nowiki>
 +
{{#ask:
 +
  [[Is equipment::True]]
 +
  [[Is located in facility::Machine Shop]]
 +
  |?Has icon=Icon
 +
  |?Has image=Image
 +
  |headers=show
 +
  |format=template
 +
  |template=EquipmentListTable
 +
  |introtemplate=EquipmentListTableIntro
 +
  |outrotemplate=EquipmentListTableOutro
 +
  |link=none
 +
}}</nowiki>
 +
 +
In this case, the search is for the same pages, but the query is being asked to return the icon from the [[Property:Has icon|Has icon]] property, and also the image from the [[Property:Has image]] property. The format is not one of the preformatted types, but a template, which is provided as the [[Template:EquipmentListTable|EquipmentListTable]] template. This template is a little tricky in that it embeds CSS tags to render the table. To make this work, a CSS head and tail are required, which are provided by the [[Template:EquipmentListTableIntro|EquipmentListTableIntro]] and [[Template:EquipmentListTableOutro|EquipmentListTableOutro]]template. Finally, to make the CSS references connect with something, CSS entries have to be installed in the MediaWiki CSS structure. This can be done via the [[MediaWiki:Common.css]] page. Here, we have created some special CSS entries for use by this table.

Navigation menu