GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing www.mediawiki.org — Extension:TemplateTableReloaded - MediaWiki
The TemplateTableReloaded extension displays tables based on template data. This extension improves on Extension:TemplateTable but is not a drop-in replacement. Installation
require_once "$IP/extensions/TemplateTableReloaded/TemplateTable.php"; Configuration OptionsDefaults: $wgTemplateTableDefaultRowLimit = 500; $wgTemplateTableMaxRowLimit = 1000; $wgTemplateTableDefaultClasses = 'wikitable'; $wgTemplateTableTagName = 'ttable'; The row limit options are used to avoid excessive database queries. The default classes variable is used to specify classes you want in the The tag name is configurable in case you prefer a different name or there is a name conflict with other extensions. Special PageThe special page is called Special:TemplateTable and it supports most of the options the tag supports. This page is useful for looking up content or linking to a table without creating a page specifically to hold a table. Usage OptionsThe only required input is the template name between the <ttable headers="" limit="" categories="" caption="" hidearticle headerformatter="" cellformatter="" ...> TemplateName </ttable> headersSpecify a pipe limitThis limits the number of rows returned. There are some administrator controlled limits as well (see above). categoriesThis is an optional, pipe For example, If you have a category with a name starting with captionThis is the table caption to use (eg. hidearticleIf this attribute is specified, the article name for each template entry will not be included in the table. headerformatterThis is useful for modifying the output of each header. This should point to a template that expects a single, numbered parameter, the name of the header. The output of the template will be used in place of the header name in the table output. cellformatterThis is useful for formatting the output of each data cell. This should point to a template that expects two, numbered parameters, the name of the column and the value for this cell. The output will be used in place of the value for this cell in the table output. Table attributesAny additional attributes allowed by MediaWiki on table tags, will be passed through to the table tag output. If the class attribute is specified, the ttable class will always be appended and any other default classes (see configuration above) will be removed. ExamplesThis is the most simple invocation. This displays all references to the <ttable>Data</ttable> Displays a JS sortable table of references to the Data template in the Cat3 category. The headers are limited to the <ttable categories='Cat3' caption="Example" limit=10 headers=name class="wikitable sortable">Data</ttable> This example hides the article name column from the output. <ttable hidearticle>Data</ttable> This example uses formatters to manipulate the output. The switch function from the ParserFunctions extension is great for determining which column the template is currently formatting. <ttable headerformatter="Data/header" cellformatter="Data/cell">Data</ttable> | ||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||||||||||||||||