Template:Album page machine/doc: Difference between revisions
beefed a bit
No edit summary |
(beefed a bit) |
||
| Line 1: | Line 1: | ||
I'm really stoked about this template so I'm making a big long documentation page. | |||
==Template code, with responses filled in== | |||
This template looks like an oversized infobox, but it generates the bare bones of a full album page (including an infobox). The following textbox displays what one would input into a blank Weezerpedia [[:Category:Albums|album page]]. It includes filled in responses that are mostly non-sensical. "release d" means release day (i.e. [[June 14]]), release y means release year, and number answers "what number in the artist's chronology is this?" Answers to the latter could be debut, sophomore, third, etc. the "t" values are track names, and the "l" values are track length. | |||
<pre> | <pre> | ||
{{Album page machine | {{Album page machine | ||
| Line 64: | Line 69: | ||
}} | }} | ||
</pre> | </pre> | ||
==What the above code gives you== | |||
{{Album page machine | {{Album page machine | ||
| Line 128: | Line 134: | ||
*''[https://shop.greenwayrecords.com/products/rachel-haden-july-6?_pos=1&_sid=2c3f823da&_ss=r July 6]'' at Greenway Records | *''[https://shop.greenwayrecords.com/products/rachel-haden-july-6?_pos=1&_sid=2c3f823da&_ss=r July 6]'' at Greenway Records | ||
}} | }} | ||
==Use, substitution== | |||
The idea here is not to make everything a template. The idea is to instead cut down the mundane data entry-like aspects of creating an album page, to provide an easy way for moderate-level editors to adhere to standard formatting for album pages, and to experiment around and figure out what that standard formatting should be in the first place. | |||
To prevent this from being a template, we need to use "{{Wiki2|Help:Substitution|substitution}}." This basically means - instead of having a template stay a template when you hit save on a page (i.e. if you went back to edit the page, it would still say ''<nowiki>{{TEMPLATE NAME:TEMPLATE CONTENT}}</nowiki>)'', the page would save as regular wikitext like any old page. This is Wikipedia help page explanation: | |||
<blockquote>Substitution is a function whereby, when an editor saves a page, an item in the wikicode is permanently replaced with its current value. In particular, templates and {{Wiki2|Help:Magic_words|magic words}} can be substituted, as an alternative to {{Wiki2|Help:Transclusion|transclusion}}. The difference is that when a template is substituted on a page, its appearance on that page will no longer be affected by later changes made to the template itself (as is the case in a transcluded template). | |||
Substitution is done using the <code>subst:</code> modifier after the double opening braces. For example, to substitute the template <nowiki>{{afd}}</nowiki>, type <nowiki>{{subst:afd}}</nowiki>. You can check the resulting wikitext before saving by clicking "Show changes" (and see what the page will look like by clicking "Show preview").</blockquote> | |||
===What does that shit mean=== | |||
Templates are normally "transcluded," which means - like I mentioned before - that when you hit save on a page with a template, then go back to edit it, you still see the template that you used. [[List of Rivers Cuomo songs]], like all song list pages, has two templates in its [[List of Rivers Cuomo songs#See also|see also section]]: | |||
<pre> | |||
==See also== | |||
*[[Rivers Cuomo]] | |||
*[[Alone series]] | |||
{{Template:Song Lists}} | |||
{{Template:Rivers Cuomo Discography}} | |||
[[Category:Lists]] | |||
[[Category:Featured article]] | |||
</pre> | |||
Those templates are big boxes of links to other things, and the lengthy and dense code for them is "transcluded" from the template page so you don't have to deal with it on the List of Rivers Cuomo songs page. When we "substitute" the template instead of transcluding, when you hit save, you're permanently left with all that dense and length code, not the very brief code of ''<nowiki>{{Template:Song Lists}}</nowiki>'' and ''<nowiki>{{Template:Rivers Cuomo Discography}}</nowiki>''. For reference, here's what the "substituted code" would look like if we entered ''<nowiki>{{subst:Template:Song Lists}}</nowiki>'' into a page, hit save, and then went back to edit that same section of the page: | |||
<pre> | |||
{{clear}} | |||
{| class="navbox" style="margin:0 auto; padding:0.2em;" | |||
|- | |||
! style="text-align:center;background-color:#a8e3ff;" | '''Song lists''' | |||
|- | |||
| style="text-align:center;font-size:11px;" | '''By artist:''' [[List of Weezer songs]] '''{{•wrap}}''' [[List of Weezer b-sides and bonus tracks]] '''{{•wrap}}''' [[List of Ozma songs]] '''<br>''' [[List of Space Twins songs]] '''{{•wrap}}''' [[List of Space Twins demos]] '''{{•wrap}}''' [[List of The Relationship songs]] '''<br>''' [[List of Carnival Art songs]] '''{{•wrap}}''' [[List of That Dog songs]] '''{{•wrap}}''' [[List of AM Radio songs]] '''{{•wrap}}''' [[List of Supersport 2000 songs]]<br> '''By songwriter:''' [[List of Rivers Cuomo songs|Rivers Cuomo]] '''{{•wrap}}''' [[List of Brian Bell songs|Brian Bell]] '''{{•wrap}}''' [[List of Scott Shriner songs|Scott Shriner]] '''{{•wrap}}''' [[List of Patrick Wilson songs|Patrick Wilson]] '''{{•wrap}}''' [[List of Matt Sharp songs|Matt Sharp]] '''{{•wrap}}''' [[List of Jason Cropper songs|Jason Cropper]] '''{{•wrap}}''' [[List of Mikey Welsh songs|Mikey Welsh]] '''{{•wrap}}''' [[List of Karl Koch songs|Karl Koch]]<br>'''Other:''' [[List of cover songs]] '''{{•wrap}}''' [[List of book-end tracks]] '''{{•wrap}}''' [[List of songs that sample Weezer]] | |||
|} | |||
<includeonly></includeonly><noinclude>[[Category:Navigation_Templates|{{PAGENAME}}]]</noinclude> | |||
</pre>. | |||
<div class="mw-collapsible mw-collapsed"> | |||
==Empty template (expandable)== | |||
Here's a fill-in-the-blank version: | |||
<div class="mw-collapsible-content"> | |||
<pre> | |||
{{Album page machine | |||
|album= | |||
|artist= | |||
|album art= | |||
|release d= | |||
|release y= | |||
|genre= | |||
|length= | |||
|label= | |||
|producer= | |||
|lastalbum= | |||
|nextalbum= | |||
|number= | |||
|t1= | |||
|l1= | |||
|t2= | |||
|l2= | |||
|t3= | |||
|l3= | |||
|t4= | |||
|l4= | |||
|t5= | |||
|l5= | |||
|t6= | |||
|l6= | |||
|t7= | |||
|l7= | |||
|t8= | |||
|l8= | |||
|t9= | |||
|l9= | |||
|t10= | |||
|l10= | |||
|t11= | |||
|l11= | |||
|t12= | |||
|l12= | |||
|t13= | |||
|l13= | |||
|t14= | |||
|l14= | |||
|t15= | |||
|l15= | |||
|t16= | |||
|l16= | |||
|t17= | |||
|l17= | |||
|t18= | |||
|l18= | |||
|t19= | |||
|l19= | |||
|t20= | |||
|l20= | |||
|personnel= | |||
|external links= | |||
}} | |||
</pre> | |||
</div></div> | |||