Difference between revisions of "W3TPL/tags"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(more complete tag list)
(alphabetical listing)
Line 7: Line 7:
  
 
==Tags==
 
==Tags==
 +
{|
 +
|-
 +
! alphabetical !! by function
 +
|-
 +
| valign=top |
 +
* {{w3tpl/tag|arg}}
 +
* {{w3tpl/tag|call}}
 +
* {{w3tpl/tag|class}}
 +
* {{w3tpl/tag|dump}}
 +
* {{w3tpl/tag|echo}}
 +
* {{w3tpl/tag|else}}
 +
* {{w3tpl/tag|for}}
 +
* {{w3tpl/tag|func}}
 +
* {{w3tpl/tag|get}}
 +
* {{w3tpl/tag|hide}}
 +
* {{w3tpl/tag|if}}
 +
* {{w3tpl/tag|let}}
 +
* {{w3tpl/tag|load}}
 +
* {{w3tpl/tag|save}}
 +
* {{w3tpl/tag|trace}}
 +
* {{w3tpl/tag|w3tpl}}
 +
* {{w3tpl/tag|xploop}}
 +
| valign=top |
 
* '''Text block inclusion''':
 
* '''Text block inclusion''':
 
** '''{{w3tpl/tag|hide}}''': Runs the parser on everything in between the tags, but doesn't display the result. Useful for doing a lot of "programmish" stuff, so you can format it nicely and comment it without messing up your display
 
** '''{{w3tpl/tag|hide}}''': Runs the parser on everything in between the tags, but doesn't display the result. Useful for doing a lot of "programmish" stuff, so you can format it nicely and comment it without messing up your display
Line 29: Line 52:
 
** '''{{w3tpl/tag|load}}'''
 
** '''{{w3tpl/tag|load}}'''
 
** '''{{w3tpl/tag|save}}''' - experimental; may not be useful without a lot more support
 
** '''{{w3tpl/tag|save}}''' - experimental; may not be useful without a lot more support
 +
|}
 +
 
==Common Attributes==
 
==Common Attributes==
 
* '''name'''=: name of variable being accessed (usage depends on tag)
 
* '''name'''=: name of variable being accessed (usage depends on tag)

Revision as of 18:42, 2 June 2012

About

Although the main "meat" of W3TPL is the (as-yet-unfinished) parser for text within <w3tpl></w3tpl> tags, there are a number of other tags which replicate much of the same functionality and may be suitable for simpler tasks.

In order to get around the parser, most of these tags have ways of using internal data for their values rather than depending on the parser to get things in the right order. to be documented

One of the weaknesses of the MediaWiki parser is that it cannot deal with nested tags properly; the ending-tag of a tag-pair nested inside another tag-pair results in closure of the outer tag-pair as well, and any text past the internal closing-tag is displayed rather than being passed to the tag handler. W3TPL allows you to get around this limitation by defining functions which are parsed separately from the code-block in which they are executing.

Tags

alphabetical by function

Common Attributes