Difference between revisions of "Template:Cite blog"

From GodWiki
Jump to navigation Jump to search
m (This should implement automatic title selection of all blog posts in up to now using title=auto.)
m (Suspect the comment was breaking links, deleting it.)
Line 1: Line 1:
[https://godvillegame.com/blog/{{#if: {{{1|}}}|post/{{{1}}}{{#if: {{{page|}}}|?page{{=}}{{{page}}}}} {{#ifeq:{{yesno|{{{short|}}}}}|yes||Godville <nowiki />}}Blog, post {{{1}}}|<nowiki/> Godville Blog}}{{#if: {{{2|}}}|&#58; <span style="font-style:italic;">{{#ifeq:{{{2}}}|auto|{{#switch:{{{1}}}
[https://godvillegame.com/blog/{{#if: {{{1|}}}|post/{{{1}}}{{#if: {{{page|}}}|?page{{=}}{{{page}}}}} {{#ifeq:{{yesno|{{{short|}}}}}|yes||Godville <nowiki />}}Blog, post {{{1}}}|<nowiki/> Godville Blog}}{{#if: {{{2|}}}|&#58; <span style="font-style:italic;">{{#ifeq:{{{2}}}|auto|{{#switch:{{{1}}}
|#default=(title not found)
|#default=(title not found)
<!-- Blog titles can be added to this list using the post number. If the URL for the blog entry is https://godvillegame.com/blog/post/1, then that is blog post number 1. If the same title is used for multiple posts, list the numbers together (e.g, 11 and 12 below). This list is only used when title=auto, any other value for title= will be displayed as the title text for the cited entry. Please don't 'correct' this list unless you have double-checked that the blog title is genuinely different to the listed title. :) -->
|2=Keeping you informed
|2=Keeping you informed

Revision as of 19:00, 16 November 2019

Godville Blog 

[view] [edit] [history] [refresh]
📚 Documentation


A convenience template for citing or referencing Godville Blog posts in Godwiki articles.


Simply provide the number of the blog post being referenced, and the mention will be formatted and linked to that post. If you omit the post number, it will create a general link to the blog.


First unnamed parameter
The blog post number.
Second unnamed parameter
The blog post name, if you want it displayed in the citation text. If you set the title to auto, the template will use a list of blog titles it knows to automatically insert the correct title for that blog. See more below.
|page=page number
If supplied, the link will link to the specified page of comments, and the citation text will include a reference to comments page specified.

Auto titling

If you set the second parameter to auto (examples below), the template will use the correct title for the blog, if known. If the title is displayed as "(title not found)", you can still set the title for the citation manually.

When a new blog is published, the title needs to be added to the template's list before if can be used automatically. This isn't difficult to do! You can try to do it yourself, or if you're not confident you understand how the template works, or your change breaks the template (preview and look at the examples below before saving), you can ask for someone to do the update for you at the Help:Requests page, and someone who's confident with templates will make the change for you.


Wikicode Renders as
{{Cite blog|89|Bingo!}} Godville Blog, post 89: Bingo!
{{Cite blog|99|auto}} Godville Blog, post 99: Little by Little
{{Cite blog|117}} Godville Blog, post 117 
{{Cite blog}} Godville Blog 
{{Cite blog|9999|auto}} Godville Blog, post 9999: (title not found)

The template is especially useful in citations (hence the name).

This code
Strange things are afoot in the world of Godville!<ref>{{Cite blog|1|auto}}</ref>

will be presented as

Strange things are afoot in the world of Godville![1]