Difference between revisions of "Template:Namespace and pagename-detecting templates"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Import from Wikipedia (CC BY-SA license))
 
m (Convert {{Aligned table}} (LUA only) to {{Navbox with columns}}. Not perfect, but it will do for now in template doc space. Added {{En-WP attribution notice}})
 
Line 8: Line 8:
 
| group1 = [[Wikipedia:Namespace|Namespace]]
 
| group1 = [[Wikipedia:Namespace|Namespace]]
 
| list1 =
 
| list1 =
  {{Navbox |child
+
  {{Navbox |child |groupwidth=10em
 
   |groupstyle=font-weight:normal;
 
   |groupstyle=font-weight:normal;
 
   |listclass=hlist
 
   |listclass=hlist
Line 40: Line 40:
  
 
| group3 = [[Wikipedia:Page name|Pagename]]
 
| group3 = [[Wikipedia:Page name|Pagename]]
| list3 =
+
| list3 = {{Navbox with columns|child
  {{Aligned table
+
| no-colclass = plainlist nowrap
  |style=text-align:left;line-height:1.3em;
+
| bodyclass = plainlist nowrap
  |col1style=padding-right:1.5em;
+
| colstyle = text-align: left; line-height: 1.3em;
  | {{tlbare|When on basepage}} | Detects and acts according to whether it is on a basepage, subpage, subsubpage or beyond.
+
| fullwidth = on
  | {{tlbare|When pagename is}} | For pattern matching on the pagename.
+
 
  | {{tlbare|When on page}}    | For pattern matching on the pagename with input reuse.
+
| col1width = 10em
  | {{tlbare|pgn}}              | Can take apart and put together pagenames in several ways.
+
| col1style = padding-right: 1.5em;
  | {{tlbare|IP-talk}}          | Returns IP-user talkpage, registered-user talkpage or non-user talkpage.
+
| col1 =
  | {{tlbare|IP-user other}}    | For detecting IP-user pages.
+
* {{tlbare|When on basepage}}
  }}
+
* {{tlbare|When pagename is}}
 +
* {{tlbare|When on page}}
 +
* {{tlbare|pgn}}
 +
* {{tlbare|IP-talk}}
 +
* {{tlbare|IP-user other}}
 +
 
 +
  | col2width = auto
 +
  | col2 =
 +
* Detects and acts according to whether it is on a basepage, subpage, subsubpage or beyond.
 +
* For pattern matching on the pagename.
 +
* For pattern matching on the pagename with input reuse.
 +
* Can take apart and put together pagenames in several ways.
 +
* Returns IP-user talkpage, registered-user talkpage or non-user talkpage.
 +
* For detecting IP-user pages.
 +
}}
  
 
| belowclass = hlist
 
| belowclass = hlist
Line 62: Line 76:
 
{{Documentation
 
{{Documentation
 
  | content =
 
  | content =
 +
{{En-WP attribution notice}}
 
{{Collapsible option |statename=optional}}
 
{{Collapsible option |statename=optional}}
  

Latest revision as of 11:10, 1 June 2015

Documentation icon Template documentation

How to manage this template's initial visibility
To manage this template's visibility when it first appears, add the parameter:

|state=collapsed to show the template in its collapsed state, i.e. hidden apart from its titlebar – e.g. {{Namespace and pagename-detecting templates |state=collapsed}}
|state=expanded to show the template in its expanded state, i.e. fully visible – e.g. {{Namespace and pagename-detecting templates |state=expanded}}

Unless set otherwise (see the |state= parameter in the template's code), the template's default state is expanded.