Template:Get Element Types

From OIAr Archive 2013
Jump to navigation Jump to search

This template only serves to find all element types for a given page - it doesn't print them. It is called with only one parameter page:

{{Get Element Types|page=}}

After calling this template, there exist two arrays (using extension ArrayExtension):

  • Array "Cats", containing all categories that page is a member of;
  • Array "ElementTypes", containing the types of element that the page is a member of (stripped of the prefix "Element type")

Thus, if page EL.Example is a member of categories FooBar, Element type foo, Element type bar, then
Cats=FooBar,Element type foo,Element type bar
ElementTypes=foo,bar After calling this template, you can access the categories and Element Types using the #arrayprint function. An example that creates a pretty, comma delimited list:

{{#arrayprint:ElementTypes||@ |@ |print=pretty}}