< Documentation
Magic Words look like template calls (surrounded by double curly braces) but most have no parameters and return a system variable value. Traditionally they are always typed in all-caps to make them easy to see in the template code, but they are actually case-insensitive.
URL Magic| Magic Word | Meaning | Example |
|---|
| {{PAGENAME}} | Returns the title of the current wiki page, without any leading namespace: | Magic Words |
| {{PAGENAMEE}} | Returns the url-encoded title of the current wiki page, without any leading namespace: | Magic_Words |
| {{PAGENAMENS}} | Returns the title of the current wiki page, without any leading namespace: or following (suffix) | Magic Words |
| {{NAMESPACE}} | Returns the url-encoded namespace portion of the current wiki page title (without the colon) | wiki |
About the following Magic Words:
- If you are not a registered user or are not logged in, Time is given as UTC.
- If you are logged in the timezone value in your profile is used to adjust the date/time to your local timezone.
Date/Time Magic| Magic Word | Meaning | Example |
|---|
| {{CURRENTTIME}} | Returns the current time | 06:10 |
| {{CURRENTHOUR}} | Returns the current hour | 06 |
| {{CURRENTTIMESTAMP}} | Returns the current date and time | 201202140610 |
| {{CURRENTTIMESTAMP2}} | Returns the current date and time in a prettier format | Tue Feb 14, 2012 6:10:26 PM |
| {{CURRENTDAY}} | Returns the current day of the month | 14 |
| {{CURRENTDOW}} | Returns the current day of the week | Tue |
| {{CURRENTDOWNAME}} | Returns the name of the current day of the week | Tuesday |
| {{CURRENTDOY}} | Returns the current day of the year | 45 |
| {{CURRENTMONTH}} | Returns the number of the current month (zero-padded to 2 characters) | 02 |
| {{CURRENTMONTHNAME}} | Returns the name of the current month | February |
| {{CURRENTMONTHABBREV}} | Returns the abbreviated name of the current month | Feb |
| {{CURRENTYEAR}} | Returns the current year | 2012 |
This page last modified 2011-02-22 13:48:47.