Difference between revisions of "Template:Lowercase"

From The iPhone Wiki
Jump to: navigation, search
Line 1: Line 1:
<includeonly>{{DISPLAYTITLE:{{lcfirst:{{PAGENAME}}}}}}</includeonly><noinclude>Lowecases the title of a page.
+
<includeonly>{{DISPLAYTITLE:{{ns|}}{{lcfirst:{{PAGENAME}}}}}}</includeonly><noinclude>
  +
Lowecases the title of a page.
 
== Usage ==
 
== Usage ==
 
(Top of page)
 
(Top of page)
<nowiki>{{lowercase}}</nowiki>
+
<nowiki>{{lowercase|ns=namespace plus colon}}</nowiki>
 
(text)
 
(text)
 
(bottom of page)
 
(bottom of page)
 
Simple, right?
 
Simple, right?
  +
  +
== Examples ==
  +
Page: IPod
  +
<nowiki>{{lowercase}}</nowiki>
  +
Try: iPod<br />
  +
True Result: iPod
  +
  +
Page: Help:Contents
  +
<nowiki>{{lowecase}}</nowiki>
  +
Try: contents<br />
  +
True Result: Help:Contents
  +
'''''NOTE:''' This does not work as DISPLAYTITLE only works with lowercasing the first letter in the title''
  +
  +
Page: Help:Contents
  +
<nowiki>{{lowercase|Help:}}</nowiki>
  +
Try: Help:contents
  +
True Result: Help:contents
  +
 
== Note ==
 
== Note ==
 
'''This contains content that n00bs may not understand'''
 
'''This contains content that n00bs may not understand'''
   
This template does not work on pages other than the main namespace as [http://mediawiki.org/wiki/Help:ParserFunctions Parser Functions] are not installed on this wiki. The [[wikipedia:Template:lowercase|wikipedia]] version does it like this: (parser function bolded)
+
This template does not natively work on pages other than the main namespace as [http://mediawiki.org/wiki/Help:ParserFunctions Parser Functions] are not installed on this wiki. The [[wikipedia:Template:lowercase|wikipedia]] version does it like this: (parser function bolded)
   
 
<nowiki>{{DISPLAYTITLE:</nowiki>'''<nowiki>{{#if:{{NAMESPACE|}}|{{NAMESPACE|}}}}</nowiki>'''<nowiki>{{lcfirst:{{PAGENAME}}}}}}</nowiki>
 
<nowiki>{{DISPLAYTITLE:</nowiki>'''<nowiki>{{#if:{{NAMESPACE|}}|{{NAMESPACE|}}}}</nowiki>'''<nowiki>{{lcfirst:{{PAGENAME}}}}}}</nowiki>

Revision as of 04:22, 2 February 2011

Lowecases the title of a page.

Usage

(Top of page)
{{lowercase|ns=namespace plus colon}}
(text)
(bottom of page)

Simple, right?

Examples

Page: IPod
{{lowercase}}

Try: iPod
True Result: iPod

Page: Help:Contents
{{lowecase}}

Try: contents
True Result: Help:Contents NOTE: This does not work as DISPLAYTITLE only works with lowercasing the first letter in the title

Page: Help:Contents
{{lowercase|Help:}}

Try: Help:contents True Result: Help:contents

Note

This contains content that n00bs may not understand

This template does not natively work on pages other than the main namespace as Parser Functions are not installed on this wiki. The wikipedia version does it like this: (parser function bolded)

{{DISPLAYTITLE:{{#if:{{NAMESPACE|}}|{{NAMESPACE|}}}}{{lcfirst:{{PAGENAME}}}}}}

That checks if there is a namespace and if yes, display it with a colon, otherwise display nothing.