Diferencia entre revisiones de «Usuario:Stargazer/General Testing»

Ir a la navegación Ir a la búsqueda
Also now exploring italicizing the page title on literature pages (would also work for the books infobox)
(Should work like the artist template does now)
(Also now exploring italicizing the page title on literature pages (would also work for the books infobox))
{{infobox
|title={{{Username|{{#ifeq:Stargazer/General Testing{{{italic-title|}}}|n|{{PAGENAME}}|''{{PAGENAME}}''}}|}}}
|id=User:Stargazer/General Testing
|1=
<!--Italicize page name-->
<includeonly>{{#ifeq:{{{italic-title|}}}|n||{{DISPLAYTITLE:''{{PAGENAME}}''}}}}</includeonly>
 
{{#if:{{{image|}}} |{{row/image+artist |{{{image}}}<!-- -->}}|}}
 
<!-- about -->
{{#if:{{{type|}}} |{{row/kv| Type |{{{type}}}<!-- -->}}|}}
{{#if:{{{author|}}} |{{row/kv| Author |{{{author}}}<!-- -->}}|}}
{{#if:{{{language|}}} |{{row/kv| Language |{{{language}}}<!-- -->}}|}}
{{#if:{{{era|}}} |{{row/kv| Created in |{{User:Stargazer|{{{era}}}}}<!-- -->}}|}}
 
 
<!-- world & universe -->
{{#if:{{{earth|}}} |{{row/kv| World |[[Earth ({{{earth}}})]]<!-- -->}}|}}
{{#if:{{{world|}}} |{{row/kv| World |[[{{{world}}}]]<!-- -->}}|}}
{{#if:{{{'world|}}} |{{row/kv| World |{{{'world}}}{{raw/world}}<!-- -->}}|}}
{{#if:{{{raw-world|}}} |{{row/kv| World |{{{raw-world}}}{{raw/world}}<!-- -->}}|}}
{{#if:{{{universe|}}} |{{row/kv| Universe |{{{universe}}}<!-- -->}}|}}
 
<!-- featured in -->{{row/kv| Featured In |''{{{books}}}''<!-- -->}}
}}<noinclude>
'''Currently testing:''' Adding links to era parameters on infoboxes. This specific example is from the {{t|literature}} infobox, but it should be applicable to all infoboxes with such a parameter. Also made changes to make the page name and infobox title italicized. This feature would be added only to the {{t|literature}} and the {{t|book}} infoboxes.
 
'''Why?''' The era parameters forward to {{t|era}}, which will break if a link is passed. By changing the templates to automatically link, we can allow the infoboxes to still generate links to the era. The italics are because, well, books titles should be italicized.
 
'''What changed?'''<br />
V. 2: <code><nowiki>{{#if:{{{era|}}} |{{row/kv| Created in |{{User:Stargazer|{{{era}}}}}<!-- -->}}|}}</nowiki></code><br />
A lot, now. There's a revised {{t|era}} at the top of [[User:Stargazer|my actual user page]] that defines valid eras, modeled off of {{t|artist-license}}. That now feeds into this template (and would do so for all infoboxes, while also auto-generating the links.
 
Italic title code:<br />
<code><nowiki>|title={{{User:Stargazer/General Testing|{{PAGENAME}}|}}}</nowiki></code> became<br /><code><nowiki>|title={{{name|{{#ifeq:{{{italic-title|}}}|n|{{PAGENAME}}|''{{PAGENAME}}''}}|}}}</nowiki></code>
 
Added line <code><nowiki><includeonly>{{#ifeq:{{{italic-title|}}}|n||{{DISPLAYTITLE:''{{PAGENAME}}''}}}}</includeonly></nowiki></code>
 
So, if <code>italic-title=n</code> is passed, the page name and infobox title are not italicized. This is needed for pages like [[The Way of Kings (in-world)]], where the whole title should not be italicized. These pages should manually be given, for example, <code><nowiki>{{DISPLAYTITLE:''The Way of Kings'' (in-world)}}</nowiki></code> (outside the infobox) and <code><nowiki>|name=''The Way of Kings''</nowiki></code> (in the infobox).
 
<!-- Actualy infobox test -->
{{User:Stargazer/General Testing
|name=''Book name''
|era=Classical Scadrial
|italic-title=n
}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla non sapien urna. In aliquam accumsan risus ac placerat. Sed sollicitudin finibus mi ac ultrices. Curabitur porta, lectus non scelerisque varius, neque turpis iaculis augue, pretium hendrerit purus leo non arcu. Aenean mattis nisl id orci viverra suscipit. Sed nec gravida orci. Sed in luctus ex. In iaculis sollicitudin condimentum. Quisque non sodales diam, eget fermentum mi.

Menú de navegación