Magic Words For Beginners

Magic words are words surrounded by brackets or underscores which most often insert or display the current value of what they are called.

  • WP:MagicBegin
  • WP:MfB

These include parser functions, variables and behavior switches and are features of wikitext. They are interpreted by the Metawiki software and are often used in templates so that they show different information depending on which page they are on and many other conditions.

Types

There are three types of magic words:

  • Behavior switches: uppercase words surrounded by double underscores, like. __NOTOC__
  • Variables: uppercase words surrounded by double braces, like {{PAGENAME}}and function somewhat similarly to templates.
  • Parser functions: These include expressions and consist of keywords (some beginning #) in double braces with parameters following a colon, ex. {{#expr:2+2}}

Things To Remember

Magic Words For Beginners 
Remember...
  • Most magic words are not case-sensitive, although some are, so you should be careful
    • "{{SITENAME}}" produces "ਵਿਕੀਪੀਡੀਆ", while "{{sitename}}" produces "ਫਰਮਾ:Sitename"
  • Whitespace is not counted in from the front and back of keywords and parameters and the same also applies to template code.
    • "{{ Nofeed |Art=Wikipedia }}" and {{Nofeed|Art=Wikipedia}} will both succeed in producing the "Nofeed" template.
  • Page-dependent magic words will change or show information about the current page, even if the word is from a template, though in most cases, this is the desired effect.
    • If I insert {{exampletemplate}} and it says {{PAGENAME}}, I will see "Magic words for beginners" even though it is from "Template:example template".
  • If you want a magic word to paste in its value at the time of saving, you can substitute it in the same way that templates are substituted (using the subst: keyword).
    • {{CURRENTTIME}} will always display the current time and remain as is, while {{subst:CURRENTTIME}} will result in, for example, 9:45 being inserted and always remaining as regular text.

Behavior Switches

Magic Words For Beginners 
The implementation of magic words.


For a more detailed explanation, refer to the behavior switches MediaWiki page.

Table Of Contents

  • __NOTOC__ (can be placed anywhere in the wikitext; prevents a table of contents)
  • __FORCETOC__ (can be placed anywhere in the wikitext; makes a table of contents appear in its normal position)
  • __TOC__ (places a table of contents at its position)
  • __NOEDITSECTION__ (hides section edit links beside headings)
  • __NEWSECTIONLINK__ (adds a "+" or "new section" link for adding a new section on a non-talk page)
  • __NONEWSECTIONLINK__ (removes the "+" or "new section" link on "Talk" pages)

Categories and Indexing

  • __NOGALLERY__ (on category pages, replaces thumbnails with normal links)
  • __HIDDENCAT__ (on category pages, makes it a hidden category)
  • __INDEX__ (tells search engines to index the page (show in results))
  • __NOINDEX__ (tells search engines not to index the page (not show in results))

Titles and Sorting

  • {{DISPLAYTITLE:title}} (changes the displayed form of the page title)
  • {{DEFAULTSORT:sortkey}} (sets a default category sorting key)

Variables

Magic Words For Beginners 
A variable in math.
Magic Words For Beginners 
A plot of variables in algebra.
(Though Magic Words are much easier!)

For documentation, you may wish to read the variables MediaWiki page.

  • {{FULLPAGENAME}} (The page title, including namespace.)
    • Shown here: ਮਦਦ:Magic words for beginners (Ex. User:QwerpQwertus/Adoption)
  • {{PAGENAME}} (page title without namespace)
    • Shown here: Magic words for beginners (Ex. User:QwerpQwertus/Adoption)
  • {{BASEPAGENAME}} (the page title without the current subpage or namespace — the parent page without the namespace.)
    • Shown here: Magic words for beginners (Ex. User:QwerpQwertus/Adoption)
  • {{SUBPAGENAME}} (subpage part of title)
    • Shown here: Magic words for beginners (Ex. User:QwerpQwertus/Adoption)
  • {{SUBJECTPAGENAME}} (associated non-talk page)
    • Shown here: ਮਦਦ:Magic words for beginners (Ex. "Talk:Wiki Magic Words For Beginners" makes "Wiki Magic Words For Beginners")
  • {{TALKPAGENAME}} (associated talk page)
    • Shown here: ਮਦਦ ਗੱਲ-ਬਾਤ:Magic words for beginners (Ex. "Wiki Magic Words For Beginners" makes "Talk:Wikipedia")
  • {{NAMESPACE}} (namespace of current page)
    • Shown here: ਮਦਦ (Ex. User:QwerpQwertus/Adoption makes "User")
  • {{SUBJECTSPACE}}, {{ARTICLESPACE}} (associated non-talk namespace)
    • Shown here: ਮਦਦ, ਮਦਦ (Ex. User talk:QwerpQwertus/Adoption makes "User")
  • {{TALKSPACE}} (associated talk namespace)
    • Shown here: ਮਦਦ ਗੱਲ-ਬਾਤ (Ex. "Wiki Magic Words For Beginners" makes "Talk:Wikipedia")
  • {{FULLPAGENAMEE}}, {{NAMESPACEE}} etc. (URL-encoded equivalents)
    • Shown here: %E0%A8%AE%E0%A8%A6%E0%A8%A6:Magic_words_for_beginners (Ex. "Wiki Magic Words For Beginners" makes "http://en.wikipedia.org/w/index.php?title=Wikipedia")

See also

For more detailed information on all magic words (behaviour switches, variables and parser functions), consider reading:

Tags:

Magic Words For Beginners TypesMagic Words For Beginners Things To RememberMagic Words For Beginners Behavior SwitchesMagic Words For Beginners VariablesMagic Words For Beginners

🔥 Trending searches on Wiki ਪੰਜਾਬੀ:

ਹੀਰ ਰਾਂਝਾਹਿਮਾਨੀ ਸ਼ਿਵਪੁਰੀਪੰਜ ਪਿਆਰੇਮਾਈ ਭਾਗੋਧਨਵੰਤ ਕੌਰਜੋਹਾਨਸ ਵਰਮੀਅਰਬੰਦਾ ਸਿੰਘ ਬਹਾਦਰਪੰਜਾਬ , ਪੰਜਾਬੀ ਅਤੇ ਪੰਜਾਬੀਅਤਸਜਦਾਮਿਲਖਾ ਸਿੰਘਕੇਂਦਰੀ ਸੈਕੰਡਰੀ ਸਿੱਖਿਆ ਬੋਰਡਇਸ਼ਤਿਹਾਰਬਾਜ਼ੀਆਧੁਨਿਕ ਪੰਜਾਬੀ ਕਵਿਤਾਸਫ਼ਰਨਾਮੇ ਦਾ ਇਤਿਹਾਸਗੁਰੂ ਹਰਿਗੋਬਿੰਦਮੁਹਾਰਨੀਪੰਜਾਬ (ਭਾਰਤ) ਦੀ ਜਨਸੰਖਿਆਪ੍ਰਦੂਸ਼ਣਮੱਧਕਾਲੀਨ ਪੰਜਾਬੀ ਸਾਹਿਤਫ਼ਿਰੋਜ਼ਪੁਰ (ਲੋਕ ਸਭਾ ਚੋਣ-ਹਲਕਾ)ਲੌਂਗ ਦਾ ਲਿਸ਼ਕਾਰਾ (ਫ਼ਿਲਮ)ਪੰਜਾਬ ਵਿੱਚ ਕਬੱਡੀਆਦਿ ਕਾਲੀਨ ਪੰਜਾਬੀ ਸਾਹਿਤਅੰਤਰਰਾਸ਼ਟਰੀਪੰਜਾਬੀ ਨਾਵਲ ਦਾ ਇਤਿਹਾਸਵਿਆਕਰਨਿਕ ਸ਼੍ਰੇਣੀਦਲੀਪ ਕੌਰ ਟਿਵਾਣਾਭਾਰਤ ਦੀ ਸੰਸਦਕਿੱਸਾ ਕਾਵਿ ਦੇ ਛੰਦ ਪ੍ਰਬੰਧਉਦਾਸੀ ਮੱਤਯੂਟਿਊਬਜਰਨੈਲ ਸਿੰਘ ਭਿੰਡਰਾਂਵਾਲੇਕੰਨਹਵਾਈ ਜਹਾਜ਼ਗਿੱਦੜ ਸਿੰਗੀਕੁੜੀਡੇਰਾ ਬਾਬਾ ਵਡਭਾਗ ਸਿੰਘ ਗੁਰਦੁਆਰਾਭਾਰਤ ਦਾ ਰਾਸ਼ਟਰਪਤੀਹੀਰਾ ਸਿੰਘ ਦਰਦਪੰਜਾਬੀ ਆਲੋਚਨਾਗੁਰਬਚਨ ਸਿੰਘ ਭੁੱਲਰਵਿਕੀਪੀਡੀਆਵਿਆਹ ਦੀਆਂ ਕਿਸਮਾਂਟੈਲੀਵਿਜ਼ਨਸੰਤ ਸਿੰਘ ਸੇਖੋਂ(ਪੰਜਾਬੀ ਸਾਹਿਤ ਆਲੋਚਨਾ ਵਿੱਚ ਦੇਣ)ਵੈੱਬਸਾਈਟਪੰਜਾਬੀ ਸਾਹਿਤ ਦਾ ਇਤਿਹਾਸ ਆਧੁਨਿਕ ਕਾਲ (1901-1995)ਸਨੀ ਲਿਓਨਜੀਨ ਹੈਨਰੀ ਡੁਨਾਂਟਗੁਰਦੁਆਰਾ ਬੰਗਲਾ ਸਾਹਿਬਸ਼ਨੀ (ਗ੍ਰਹਿ)ਸ਼ਾਹ ਹੁਸੈਨਆਸਟਰੇਲੀਆਪੰਜਾਬੀ ਕੈਲੰਡਰਰਿਸ਼ਤਾ-ਨਾਤਾ ਪ੍ਰਬੰਧਪੰਛੀਗਿੱਧਾਸਿੱਖ ਧਰਮਗ੍ਰੰਥਅਕਾਲੀ ਫੂਲਾ ਸਿੰਘਦੁਸਹਿਰਾਸ਼ਬਦਕੋਸ਼ਪੰਜਾਬੀ ਕਹਾਣੀਜਾਤ1917ਘੜਾਸੀ.ਐਸ.ਐਸਸਿੱਖਗੁਰ ਅਰਜਨਸਿਰ ਦੇ ਗਹਿਣੇਮਹਿਮੂਦ ਗਜ਼ਨਵੀਅਕਾਲੀ ਹਨੂਮਾਨ ਸਿੰਘਗਿਆਨਇਕਾਂਗੀਪਿਆਰਢੋਲਸੋਹਿੰਦਰ ਸਿੰਘ ਵਣਜਾਰਾ ਬੇਦੀਨਿਬੰਧਮਾਰਗੋ ਰੌਬੀ🡆 More