AoPSWiki
Art of Problem Solving's Intermediate Number Theory Seminar course starts on October 21. Learn advanced topics in number theory, including those needed for success on the AIME. Click here to enroll today!
Personal tools

Help:Variables

From AoPSWiki

A variable is called in the form of a template (one without parameters). Variables often refer to specific aspects of the respective page or the wiki, or to time and date variables.

Date
{{CURRENTDAY}} 14 Displays day
{{CURRENTYEAR}} 2008 Displays year
{{CURRENTMONTHNAME}} October Displays month
{{CURRENTTIME}} 14:37 Displays time
{{CURRENTHOUR}} 14 Displays hour
More
{{PAGENAME}} Variables Displays name of page (without namespace)
{{PAGENAMEE}} Variables Same as PAGENAME, but formatted for an URL.

Also, in templates, you can specify a variable in it with {{{VARNAME}}}.

Then, when the template is put onto another page, you can specify the variable as follows:

{{TEMPLATENAME | VARNAME = VALUE }}

which replaces the variable with VALUE. Note that if you name the variables {{{1}}},{{{2}}},{{{3}}}, etc. then you can specify the values without listing the variable names in the template call.

See also

This article is a tutorial about the AoPSWiki or AoPS Forum.

Add a glimpse of the Art of Problem Solving Forum to your own site!
Click here for details!
© Copyright 2008 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us