Template:Italic title: Difference between revisions

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
(Created page with "{{#invoke:Italic title|main}}<noinclude> This template italicizes page titles. Article titles cannot contain wiki-formatting, such as <code><nowiki>''</nowiki></code>, so cann...")
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
**<code>Foo (bar)</code> &rarr; '''''Foo'' (bar)'''
**<code>Foo (bar)</code> &rarr; '''''Foo'' (bar)'''
**<code>Talk:Foo (bar)</code> &rarr; '''Talk:''Foo'' (bar)'''
**<code>Talk:Foo (bar)</code> &rarr; '''Talk:''Foo'' (bar)'''
*Italicization can be forced on parenthesized text with the {{para|all|yes}} parameter.
*Titles which contain "-class" within the parenthesis will italicize text within the parethesis up to "-class".
**<code>Foo (bar-class)</code> &rarr; '''''Foo'' (''bar''-class)'''
**<code>Talk:Foo (bar-class)</code> &rarr; '''Talk:''Foo'' (''bar''-class)'''


==Usage==
==Usage==
Line 15: Line 17:


<pre>{{italic title}}</pre>
<pre>{{italic title}}</pre>
 
[[Category:Utility templates]]
'''All parameters'''
 
<pre>{{italic title|noerror|all=yes}}</pre>
 
== Parameters ==
 
* '''1''': if this is set to "noerror", error messages are suppressed. See [[#Errors]] for more details.
* '''all''': if this is set to "yes", text in parentheses is italicized.
 
== Errors ==
 
Sometimes you may see red error messages like this at the top of the page:
 
<span class="error"><nowiki>Warning: Display title "<i>Article title (disambiguation)</i>" overrides earlier display title "<i>Article title</i> (disambiguation)".</nowiki></span>
 
This usually means that there is another instance of <nowiki>{{italic title}}</nowiki> on the page, usually added by one of the infoboxes. Certain infoboxes, for example {{tl|Ship}}, add <nowiki>{{italic title}}</nowiki> by default. Check the template documentation for any infobox used on the page; it may have instructions about how to deal with italic titles. You may be able to adjust the italics from the infobox instead of using <nowiki>{{italic title}}</nowiki> at the top of the article. Or if that doesn't work, you may be able to disable the infobox's italics code altogether.
 
If you are still having problems, try putting <nowiki>{{italic title}}</nowiki> after the infobox. You can suppress the error message by using the code <code><nowiki>{{italic title|noerror}}</nowiki></code>.
 
Technical details: this template uses the DISPLAYTITLE magic word to italicize the title. Error messages can be produced by any two templates which use this magic word, and are not limited to this template. If you are unsure why you are getting a particular error message, you can ask the Wiki staff.
 
</noinclude>
</noinclude>

Latest revision as of 01:30, 14 July 2016

This template italicizes page titles. Article titles cannot contain wiki-formatting, such as '', so cannot be italicized in the normal way. Instead, place this template in the article, normally at the very top. It will then have the following effect:

  • Titles with no parentheses () are fully italicised:
    • FooFoo
    • Talk:FooTalk:Foo
  • Titles which contain parentheses are italicised before the first opening parenthesis:
    • Foo (bar)Foo (bar)
    • Talk:Foo (bar)Talk:Foo (bar)
  • Titles which contain "-class" within the parenthesis will italicize text within the parethesis up to "-class".
    • Foo (bar-class)Foo (bar-class)
    • Talk:Foo (bar-class)Talk:Foo (bar-class)

Usage

Basic usage

{{italic title}}