Difference between revisions of "User:FeRDNYC/Template Sandbox"

From GodWiki
Jump to: navigation, search
m (Fix special chars, subst is confusing)
(Tags: Mobile edit, Mobile web edit)
m (flesh out a bit more)
Line 1: Line 1:
<noinclude>The infoboxes are released into the wild, on to new things!</noinclude>
+
<noinclude>The infoboxes are released into the wild, on to new things!
 +
 
 +
This is an example of the ''possibilities'' for auto-filling new articles with "shell" content using <code><nowiki>{{subst:}}</nowiki></code>. A user could type {{tlc|subst:New article template}} (or similar) and save the page, which would replace that code with everything that follows except the {{tag|onlyinclude}} tags.
 +
</noinclude>
 
<pre><onlyinclude><!--
 
<pre><onlyinclude><!--
 
This is a sample Article  
 
This is a sample Article  
  
It contains comment blocks like this to provide information to editors. The comments won't be visible in the final output.
+
It contains comment blocks like this to provide information to editors. The comments won't be visible in the final output. Everything between the comment open (< !--) to close (-- >) markers will be ignored when the article is formatted.
 +
 
 +
One important note: Blank lines in the source for a wiki article create vertical whitespace — each empty line creates a new paragraph, basically, and multiple blank lines in a row create empty paragraphs that push text down the page. You can't add blank lines for readability or to separate parts of the text without affecting the formatted page.  
  
One important note: Blank lines in the source for a wiki article create vertical whitespace — each empty line creates a new paragraph, basically, and multiple blank lines in a row create empty paragraphs that push text down the page. So, you want to be sparing about blank lines, and when removing comments you want to remove the line they occupy, as well, not merely remove the text and leave a blank line. These comment blocks count as one blank line from the open (< !--) to close (-- >) symbols, so you want to avoid inserting too many extras unless you delete the comments and the lines they occupy.
+
So, you want to be sparing about blank lines, and when removing comments be sure to remove the ENTIRE line (or lines) containing the comment. Don't merely erase the text and leave a blank line. Each comment block already counts as one blank line, so especially avoid inserting more, unless you remove the comments AND the lines they occupy.
  
Feel free to delete this comment block when saving your article, or not delete it. Either way is fine, it won't affect how the formatted article looks.
+
Feel free to delete this comment block when saving your article, or not delete it. Either way is fine, it won't affect how the formatted article looks (other than the spacing issue already mentioned).
 
-->
 
-->
 
{{Infobox
 
{{Infobox
Line 15: Line 20:
 
| param4 =
 
| param4 =
 
}}
 
}}
 +
<!--
 +
  HISTORY SECTION
 +
-->
 
<!-- REMOVE THIS LINE AND THE LINE TWO-BELOW for a "History" section heading
 
<!-- REMOVE THIS LINE AND THE LINE TWO-BELOW for a "History" section heading
 
==History==
 
==History==
 
     REMOVE THIS LINE AND THE LINE TWO-ABOVE for a "History" section heading -->
 
     REMOVE THIS LINE AND THE LINE TWO-ABOVE for a "History" section heading -->
<!--Write any "History" content you like here. Remove this comment and the ones around the heading --></onlyinclude></pre>
+
<!--Write any "History" content you like here. Remove this comment and the ones around the heading -->
 +
<!--
 +
  SOME OTHER SECTION
 +
-->
 +
<!-- REMOVE THIS LINE AND THE LINE TWO-BELOW for a section heading (be sure to edit the name)
 +
==Section title (don't use Title Caps)
 +
    REMOVE THIS LINE AND THE LINE TWO-ABOVE for a section heading -->
 +
<!--Write any content for this section here. Remove this comment and the ones around the heading --></onlyinclude></pre>

Revision as of 15:44, 21 December 2018

The infoboxes are released into the wild, on to new things!

This is an example of the possibilities for auto-filling new articles with "shell" content using {{subst:}}. A user could type {{subst:New article template}} (or similar) and save the page, which would replace that code with everything that follows except the <onlyinclude>...</onlyinclude> tags.

<onlyinclude><!--
This is a sample Article 

It contains comment blocks like this to provide information to editors. The comments won't be visible in the final output. Everything between the comment open (< !--) to close (-- >) markers will be ignored when the article is formatted.

One important note: Blank lines in the source for a wiki article create vertical whitespace — each empty line creates a new paragraph, basically, and multiple blank lines in a row create empty paragraphs that push text down the page. You can't add blank lines for readability or to separate parts of the text without affecting the formatted page. 

So, you want to be sparing about blank lines, and when removing comments be sure to remove the ENTIRE line (or lines) containing the comment. Don't merely erase the text and leave a blank line. Each comment block already counts as one blank line, so especially avoid inserting more, unless you remove the comments AND the lines they occupy.

Feel free to delete this comment block when saving your article, or not delete it. Either way is fine, it won't affect how the formatted article looks (other than the spacing issue already mentioned).
-->
{{Infobox
| param1 =
| param2 = 
| param3 = 
| param4 =
}}
<!--
  HISTORY SECTION
-->
<!-- REMOVE THIS LINE AND THE LINE TWO-BELOW for a "History" section heading
==History==
     REMOVE THIS LINE AND THE LINE TWO-ABOVE for a "History" section heading -->
<!--Write any "History" content you like here. Remove this comment and the ones around the heading -->
<!--
  SOME OTHER SECTION
-->
<!-- REMOVE THIS LINE AND THE LINE TWO-BELOW for a section heading (be sure to edit the name)
==Section title (don't use Title Caps)
     REMOVE THIS LINE AND THE LINE TWO-ABOVE for a section heading -->
<!--Write any content for this section here. Remove this comment and the ones around the heading --></onlyinclude>