Help:Magic words

From RationalWiki
Jump to: navigation, search

Magic words are wikitext markup that tell the server to do stuff. Useful for making templates.

List of:

Examples[edit]

{{Welcome}} uses {{PAGENAME}} returns the the page's title. Since this template is placed on user's talk pages, the page title is the user's username.

Our Trump tweet generator uses {{#time: ... }} to imitate Twitter's time stamp on tweets.

{{#time:h\:i A}} - {{CURRENTDAY}} {{#time:M}} {{CURRENTYEAR}}

results in: 08:58 AM - 18 Oct 2019.

Show your username[edit]

It's not a magic word, but still awesome.

<span class="myName">Anonymous User</span>
results in Anonymous User.

We have a template {{USERNAME}} which is just <span class="myName">Anonymous User</span> inside.

See also[edit]