Template:Cite/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 2: Line 2:
== Usage ==
== Usage ==
This is a replacement for {{tl2|ref}}, which is very basic and does not include a lot of features. Only parameter is {{param|1}}, which defines the id to link to. This template is used in tandem with {{tl2|ref2}} and {{tl2|references}} to mimic citing, as the MediaWiki version we are provided with does not have citing extensions enabled like Wikipedia and other wikis.
This is a replacement for {{tl2|ref}}, which is very basic and does not include a lot of features. Only parameter is {{param|1}}, which defines the id to link to. This template is used in tandem with {{tl2|ref2}} and {{tl2|references}} to mimic citing, as the MediaWiki version we are provided with does not have citing extensions enabled like Wikipedia and other wikis.
 
{{Cite/doc/example}}
==Example==
{{Bug|Links with "{{=}}" on it will break the template. Please use the {{T|{{=}}}} template as a workaround.}}
{{pre|1=<nowiki>{{highlight|color=white|text color=black|1=This is really cool text from an external source.}}{{cite|1}}{{cite|2}}{{cite|4}}
 
{{highlight|color=white|text color=black|1=This is really cool text from an external source which has since become dead.}}{{cite|3}}
{{lorem ipsum|5}}
<!-- Copy this area below -->
{{references|1=
{{ref2|cite id=1|This is the external source that the text was cited from}}
{{ref2|cite id=2|access-date=November 18, 2024|Doe, John (November 17, 2024). "Articles about {{hl2|1}} 20th Anniversary". ''Website name''.}}
{{ref2|cite id=3|access-date={{#time: F d, Y }}|Doe, John ({{#time: F d, Y }}). "Lorem ipsum". ''Website name''. [https://web.archive.org Archived] from the original in {{#time: F d, Y }}.}}
{{ref2|cite id=4|access-date={{#time: F d, Y }}|X (Twitter) name here (@username) (January 1, 2010). "Lorem ipsum". ''{{twitter}}''.}}
}}</nowiki>}}
<!-- Preview -->
{{highlight|color=white|text color=black|1=This is really cool text from an external source.}}{{cite|1}}{{cite|2}}{{cite|4}}
 
{{highlight|color=white|text color=black|1=This is really cool text from an external source which has since become dead.}}{{cite|3}}
 
{{lorem ipsum|5}}
{{references|1=
{{ref2|cite id=1|This is the external source that the text was cited from}}
{{ref2|cite id=2|access-date=November 18, 2024|Doe, John (November 17, 2024). "Articles about {{hl2|1}} 20th Anniversary". ''Website name''.}}
{{ref2|cite id=3|access-date={{#time: F d, Y }}|Doe, John ({{#time: F d, Y }}). "Lorem ipsum". ''Website name''. [https://web.archive.org Archived] from the original in {{#time: F d, Y }}.}}
{{ref2|cite id=4|access-date={{#time: F d, Y }}|X (Twitter) name here (@username) (January 1, 2010). "Lorem ipsum". ''{{twitter}}''.}}
}}

Latest revision as of 23:40, 27 July 2025

Edit-copy.png
This is a documentation subpage for Template:Cite.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Usage

This is a replacement for {{ref}}, which is very basic and does not include a lot of features. Only parameter is {{{1}}}, which defines the id to link to. This template is used in tandem with {{ref2}} and {{references}} to mimic citing, as the MediaWiki version we are provided with does not have citing extensions enabled like Wikipedia and other wikis.

Example

{{lorem ipsum|1}}{{cite|1}}

{{highlight|color=white|text color=black|1=This is really cool text from an external source.}}{{cite|2}}{{cite|4}}{{cite|5}}

{{highlight|color=white|text color=black|1=This is really cool text from an external source which has since become dead.}}{{cite|3}}

{{lorem ipsum|1}}{{cite|6}}{{cite|7}}{{Citation
    | cite id      = 1
    | last         = Doe
    | first        = John
    | author       = Doe, John S
    | date         = 27 September, 2007
    | title        = Really Cool Article
    | url          = http://url/
    | website      = Site Name
    <!--| work         = Work Name-->
    | location     = Planet Earth
    | publisher    = Cool name Publishing
    | url-status   = <!-- dead, live, deviated -->
    | archive-url  = http://archiveurl/
    | archive-date = 4 July, 2016
    | access-date  = 28 July, 2025
}}
{{Citation
    | cite id = 5
    | 1 = Old template being used in this testcase! Please fix!
    | access-date = 7 March, 2024
}}
{{Citation
    | cite id = 6
    | title = Test title for things
}}
{{Citation
    | cite id = 7
}}
{{Citation|}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.[1]

This is really cool text from an external source.[2][4][5]

This is really cool text from an external source which has since become dead.[3]

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.[6][7]

References

References
1. Doe, John S (27 September, 2007), Really Cool Article (Archived). Site Name. Planet Earth: Cool name Publishing. Archived from the original on 4 July, 2016. Retrieved on 28 July, 2025.
2. Doe, Jane (30 October, 1994), Totally Awesome Article. Daily Planet. Metro City. Archived from the original on 7 July, 2010. Retrieved on 28 July, 2025.
3. Parker, Peter (2005), Green Goblin Jailed! (Archived). Daily Planet. Metro City. Archived from the original (Deviated) on 7 July, 2005. Retrieved on 30 July, 2025.
4. Green Goblin Jailed!. Retrieved on 30 July, 2025.
5. Old template being used in this testcase! Please fix!. Retrieved on 7 March, 2024.
6. Test title for things.
7. {{missing necessary {{{title}}}!}}.
{{missing necessary {{{cite id}}}!}} {{missing necessary {{{title}}}!}}.