Difference between revisions of "Template:Cite"

From AlchemistryWiki
Jump to navigation Jump to search
m
Line 2: Line 2:
  
 
--><noinclude>
 
--><noinclude>
<hr />
+
'''USAGE:'''
This template is designed to be used in the following way:
+
<nowiki>{{Cite | SHORTCUT NAME TO USE LATER | FULL NORMAL CITATION | CITE-U-LIKE LINK}}</nowiki>
 
 
<nowiki>{{Cite | SHORTCUT NAME TO USE LATER | FULL NORMAL CITATION | CITE-U-LIKE LINK}}</nowiki>
 
  
 
It should be noted that this page does have a "references" at the bottom of it, but that is not part of the template, '''you will need to include a <nowiki>"<references />"</nowiki> at the end of your document'''
 
It should be noted that this page does have a "references" at the bottom of it, but that is not part of the template, '''you will need to include a <nowiki>"<references />"</nowiki> at the end of your document'''
  
 
If you have already used this reference name once, then you can simply use the <nowiki>{{Cite | REF NAME}}</nowiki>
 
If you have already used this reference name once, then you can simply use the <nowiki>{{Cite | REF NAME}}</nowiki>
 +
 +
For those of you wanting to see how and why this works, please check the following pages (in no particular order):
 +
[http://www.mediawiki.org/wiki/Extension:StringFunctions String Parsing],
 +
[http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23if Parser Logic],
 +
[https://www.mediawiki.org/wiki/Help:Magic_words#Miscellaneous Magic words for refs inside templates],
 +
[http://en.wikipedia.org/wiki/Help:Template#Noinclude.2C_includeonly.2C_and_onlyinclude includeonly and noinclude],
 +
And understanding that the <nowiki><!-- ... -></nowiki> is the html equivalent of a comment and without it, the extra whitespace would be parsed into the template as well. The noinclude inside the #pos word is to ensure the citation is not done twice.
  
 
{{Reflist hide}}
 
{{Reflist hide}}
  
 
</noinclude>
 
</noinclude>

Revision as of 13:11, 21 September 2012

USAGE:

{{Cite | SHORTCUT NAME TO USE LATER | FULL NORMAL CITATION | CITE-U-LIKE LINK}}

It should be noted that this page does have a "references" at the bottom of it, but that is not part of the template, you will need to include a "<references />" at the end of your document

If you have already used this reference name once, then you can simply use the {{Cite | REF NAME}}

For those of you wanting to see how and why this works, please check the following pages (in no particular order): String Parsing, Parser Logic, Magic words for refs inside templates, includeonly and noinclude, And understanding that the <!-- ... -> is the html equivalent of a comment and without it, the extra whitespace would be parsed into the template as well. The noinclude inside the #pos word is to ensure the citation is not done twice.