Template

Thingamabob: Difference between revisions

From Joomla! Documentation

CirTap (talk | contribs)
mNo edit summary
CirTap (talk | contribs)
mNo edit summary
Line 3: Line 3:
|{{#switch: {{#NAMESPACE:{{FULLPAGENAME}}}}
|{{#switch: {{#NAMESPACE:{{FULLPAGENAME}}}}
   |{{ns:0}} = {{{1|article}}}
   |{{ns:0}} = {{{1|article}}}
  |JDOC = project {{{1|}}}
   |{{ns:8}}|{{ns:mediawiki}} = {{{1|system message}}}
   |{{ns:8}}|{{ns:mediawiki}} = {{{1|system message}}}
   |#default = {{lc:{{#NAMESPACE:{{FULLPAGENAME}}}}}} {{{1|}}}<!--
   |#default = {{lc:{{#NAMESPACE:{{FULLPAGENAME}}}}}} {{{1|}}}<!--
-->}} }}<noinclude>
-->}} }}<noinclude>
{{documentation}}</noinclude>
{{documentation}}</noinclude>

Revision as of 18:35, 10 May 2008

{{#namespace:template:thingamabob}}

[view] [edit] [history]

Template documentation

Returns a generalized term for a page's thingamabob … err … Wotsitcalled? Right … Namespace!

The "return value" is used in several templates to create different phrases and categories or as a condition where {{main talk file other}} is too generic.

Usage

Parameters

Parameter Parameter description req./opt.
{{{1}}} a supplemental noun such as section or paragraph added to thingamabob optional

Known issues

An attempt to create a plural of the resulting string via {{thingamabob}}s may look odd or become grammatically wrong. Localisation can be tough and should probably defer the strings to system messages.

The default behaviour is to return {{lc:{{NAMESPACE}}}}, hence if new namespaces are added to the wiki, {{thingamabob}} may require an update to reflect or "rename" the content type of those namespaces.

See also

  • {{main talk file other}} for a more generic version but an option to return individual labels per namespace group.