Help:Templates: Difference between revisions
add the series templates I just created |
|||
| Line 42: | Line 42: | ||
<pre>{{Separator|f||300px}}</pre> | <pre>{{Separator|f||300px}}</pre> | ||
==Tags to | ==Tags to indicate content or status== | ||
The following content warning templates may be used at the start of a story page to alert readers to potentially displeasing content they may encounter in the story: | The following content warning templates may be used at the start of a story page to alert readers to potentially displeasing content they may encounter in the story and to inform them of the story's status: | ||
{| border="1" | {| border="1" | ||
| Line 91: | Line 91: | ||
|<nowiki>{{note|note text}}</nowiki> | |<nowiki>{{note|note text}}</nowiki> | ||
|{{note|note text}} | |{{note|note text}} | ||
|} | |||
== Linking stories in a series== | |||
These templates are handy for creating nicely formatted and easy to find links between stories that form a connected series. This is intended primarily for stories that should be read in a specific order, not necessarily stories that are simply set in the same general universe; for those it is normally enough to just put that shared setting's category on the story. | |||
The first template, series box, is intended to be used at the top of the story. It tucks itself away to the right, much like a table of contents. The second template, series bar, is horizontally oriented and centered on the page. It's intended for use down at the bottom of the story, though if you like it works at the top just fine as well. | |||
{| border="1" | |||
|- | |||
!Template code | |||
!Displayed template | |||
|- | |||
|<nowiki>{{series box|series=Series name|previous=[[Previous story]]|next=[[Next story]]}}</nowiki> | |||
|{{series box|series=Series name|previous=[[Previous story]]|next=[[Next story]]}} | |||
|- | |||
|<nowiki>{{series bar|series=Series name|previous=[[Previous story]]|next=[[Next story]]}}</nowiki> | |||
|{{series bar|series=Series name|previous=[[Previous story]]|next=[[Next story]]}} | |||
|} | |} | ||
Revision as of 23:11, 9 August 2007
A "template" is a small Shifti page in the template namespace that one can insert into the body of another page via a process called "transclusion". Templates are denoted using curley brackets instead of square brackets.
Story formatting
These templates are useful for adding a title and author byline or section headers in a standardized manner.
| Template Code | Displayed template |
|---|---|
| {{title|name=name of page|author=page author|user=shifti user name}} Full documentation available at Template:Title |
User| Example | Example}}[[Title::{{#ifeq: Help |User| Example | Example}}| ]] {{#ifeq: | | {{#ifeq: {{#ifeq: Help |User| Example | Example}} | |
{{#ifeq: {{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}} | ||
Author: [[User:{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}|{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}]] [[Author::{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}| ]]
}} |
{{#ifeq: {{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}} | |
Author: {{#ifeq: Help |User| Example | Example}} |
Author: [[User:{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}|{{#ifeq: Help |User| Example | Example}}]] [[Author::{{#ifeq: Help |User| Example | Example}}| ]]
}}
}} |
{{#ifeq: {{#ifeq: Help |User| Example | Example}} | |
{{#ifeq: {{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}} | | Authors: ' |
Authors: [[User:{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}|{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}]]
}} |
{{#ifeq: {{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}} | |
Authors: {{#ifeq: Help |User| Example | Example}} |
Author: [[User:{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}|{{#ifeq: Help |User| Example | Example}}]]
}}
}}
}} {{#if:| — see [[:Category:{{{category}}}|other works by this author]]}} |
| {{dropcap|O}}nce upon a time... | Once upon a time there was a lovely little template for creating "drop caps" at the beginning of a story - ie, a very large letter descending below the first line that the text in subsequent lines flows around. See Template:dropcap for more extensive description and example text. |
Decorative dingbats
Template:Separator allows the use of a variety of separator "dingbats", or decorative images, for dividing up a story in a fancy way. The template takes three parameters; an identifier determining which particular image to use, an optional bit of text to insert in the middle of the separator, and an optional parameter to define the width of the images in pixels.
One may include wiki markup in the text, for example the following uses boldface:
{{Separator|f|'''The End'''}}
One may also combine a separator with a header, like so:
=={{separator|f|Chapter 7: The Bit With The Cheese}}==
Make sure to put the header markup outside the separator template rather than inside with the text.
You can override the default image widths (200 pixels for the text-free image, 100 pixels for the text-bracketing images) by inserting a third parameter indicating how wide in pixels each image should be:
{{Separator|f|Text|200px}}
To override the default width for the text-free image use an empty text parameter:
{{Separator|f||300px}}
Tags to indicate content or status
The following content warning templates may be used at the start of a story page to alert readers to potentially displeasing content they may encounter in the story and to inform them of the story's status:
When multiple tags are placed at the top of the same page they automatically group themselves in a column.
Templates for suggesting edits within story text
These templates may be useful for collaborative editing. They allow an editor to add notes to a story making suggestions about things that he or she thinks should be changed, similar to the wiki's built-in function for displaying the differences between revisions of a page but without having to go digging into the article's revision history to find it.
| Template code | Displayed template |
|---|---|
| {{add|text to add}} | text to add |
| {{remove|text to remove}} | text to remove |
| {{replace|text to remove|text to replace it with}} | text to removetext to replace it with |
| {{note|note text}} | note text |
Linking stories in a series
These templates are handy for creating nicely formatted and easy to find links between stories that form a connected series. This is intended primarily for stories that should be read in a specific order, not necessarily stories that are simply set in the same general universe; for those it is normally enough to just put that shared setting's category on the story.
The first template, series box, is intended to be used at the top of the story. It tucks itself away to the right, much like a table of contents. The second template, series bar, is horizontally oriented and centered on the page. It's intended for use down at the bottom of the story, though if you like it works at the top just fine as well.
| Template code | Displayed template | ||||||
|---|---|---|---|---|---|---|---|
| {{series box|series=Series name|previous=[[Previous story]]|next=[[Next story]]}} | {{#if:Previous story| }}{{#if:Next story| }}
| ||||||
| {{series bar|series=Series name|previous=[[Previous story]]|next=[[Next story]]}} |
| ||||||











