Always snap to grid

Difference between revisions of "Template:Classname"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
 
Line 1: Line 1:
{{#if:{{{1|}}}
+
{{#if:0{{#pos:{{#replace:{{{1|{{SUBPAGENAME}}}}}||_}}|_(}} AND 0{{#pos:{{{1|{{SUBPAGENAME}}}}}|(}} > 0{{#pos:{{#replace:{{{1|{{SUBPAGENAME}}}}}||_}}|_(}}|{{#sub:{{#replace:{{{1|{{SUBPAGENAME}}}}}| |_}}|0|{{#pos:{{#replace:{{{1|{{SUBPAGENAME}}}}}||_}}|_(}}}}|{{#replace:{{#sub:{{{1|{{SUBPAGENAME}}}}}|0|{{#pos:{{{1|{{SUBPAGENAME}}}}}|(}}}}| |_}}}}<noinclude>
|{{#if:{{#pos:{{{1}}}|(}}
+
| {{#sub:{{#replace:{{{1}}}|<nowiki> </nowiki>|_}}
+
  | 0
+
  | {{#expr:{{#pos:{{{1}}}|(}} - 1}}
+
  }}
+
| {{#replace:{{{1}}}|<nowiki> </nowiki>|_}}
+
}}|{{#if:{{#pos:{{SUBPAGENAME}}|(}}
+
| {{#sub:{{SUBPAGENAMEE}}
+
  | 0
+
  | {{#expr:{{#pos:{{SUBPAGENAME}}|(}} - 1}}
+
  }}
+
| {{SUBPAGENAMEE}}
+
}}}}<noinclude>
+
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 15:39, 7 March 2008

Classname

[edit] Documentation

This utility template extracts the actual class name from a class page name. Game-specific class pages may have a game name appended in parentheses and due to technical restrictions canonical page names always have spaces instead of underscores. The alternate URL-encoded form always has underscores instead of spaces, but also escapes many other characters.

Class and interface description pages containing Template:Infobox class and Template:Infobox interface respectively make the page titles look as if the page name contains underscores only in the correct places through the use of this template and the "magic word" {{DISPLAYTITLE}}.

Usage[edit]

This template can take one parameter, which defaults to the current subpage name if omitted.

Suppose the following code is on the page with the canonical name "UE2:ACTION GotoAction (UT2003)":

{{classname}}

It would return: ACTION_GotoAction

Note that the same code would return "Foo" if used on the subpage "ACTION GotoAction (UT2003)/Foo".

See also[edit]