Difference between revisions of "Template:Acad/sandbox"
blackwiki>Trappist the monk |
m (44 revisions imported) |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{cite encyclopedia | {{cite encyclopedia | ||
| − | |title={{{title|{{{name|{{{2|}}}}}}}}} | + | <!-- set title to "title" parameter or second argument |
| − | |url={{#if:{{{id|{{{1|}}}}}}|http://venn.lib.cam.ac.uk/cgi-bin/search.pl?sur=&suro= | + | if "id" or first unnamed parameter is set then |
| + | append it in parentheses | ||
| + | --> | ||
| + | |title={{{title|{{{name|{{{2|}}}}}}}}} {{#if:{{{id|{{{1|}}}}}}|({{{id|{{{1|}}}}}})}} | ||
| + | |||
| + | <!--if "id" or first unnamed parameter is set | ||
| + | then set to url to that parameter | ||
| + | otherwise set to a url to a search page | ||
| + | --> | ||
| + | |url={{#if:{{{id|{{{1|}}}}}}|http://venn.lib.cam.ac.uk/cgi-bin/search-2016.pl?sur=&suro=w&fir=&firo=c&cit=&cito=c&c=all&z=all&tex={{{1|{{{id}}}}}}&sye=&eye=&col=all&maxcount=50|http://venn.lib.cam.ac.uk/acad/2016/search-2016.html}} | ||
| + | |||
|encyclopedia=A Cambridge Alumni Database | |encyclopedia=A Cambridge Alumni Database | ||
|publisher=University of Cambridge | |publisher=University of Cambridge | ||
|accessdate={{#if:{{{accessdate|}}}|{{{accessdate}}}}} | |accessdate={{#if:{{{accessdate|}}}|{{{accessdate}}}}} | ||
| + | |||
| + | <!--If a ref parameter is passed in then | ||
| + | set ref to that value, | ||
| + | else if "id" or the first unnamed parameter is set then | ||
| + | set ref to ACAD and the value of that parameter | ||
| + | --> | ||
|ref={{#if:{{{ref|}}}|{{{ref}}}|{{#if:{{{id|{{{1|}}}}}}|{{SfnRef|ACAD|{{{id|{{{1|}}}}}} }} }} }} | |ref={{#if:{{{ref|}}}|{{{ref}}}|{{#if:{{{id|{{{1|}}}}}}|{{SfnRef|ACAD|{{{id|{{{1|}}}}}} }} }} }} | ||
| − | }}{{#ifeq:{{{hide errors|}}}|yes||{{#if:{{{id|{{{1|}}}}}}|| <span style="font-size:100%" class="error citation-comment">missing <code>id</code>.</span>}}<!-- | + | }}<!--end of cite encyclopedia-->{{#ifeq:{{{hide errors|}}}|yes||{{#if:{{{id|{{{1|}}}}}}|| <span style="font-size:100%" class="error citation-comment">missing <code>id</code>.</span>}}<!-- |
-->{{#if:{{{name|{{{2|}}}}}}|| <span style="font-size:100%" class="error citation-comment">missing <code>name</code>.</span>}}<!-- | -->{{#if:{{{name|{{{2|}}}}}}|| <span style="font-size:100%" class="error citation-comment">missing <code>name</code>.</span>}}<!-- | ||
-->{{#ifeq:{{{ref}}}|harv| <span style="font-size:100%" class="error citation-comment"><code>{{!}}ref{{=}}harv</code> not recommended.</span>}}}}<!-- | -->{{#ifeq:{{{ref}}}|harv| <span style="font-size:100%" class="error citation-comment"><code>{{!}}ref{{=}}harv</code> not recommended.</span>}}}}<!-- | ||
| − | -->{{#ifeq:{{ | + | -->{{#ifeq:{{NAMESPACEE}}||{{#if:{{{id|{{{1|}}}}}}||[[Category:ACAD citations missing parameters]]}}<!-- |
| − | {{documentation}} | + | -->{{#if:{{{name|{{{2|}}}}}}||[[Category:ACAD citations missing parameters]]}}}}<noinclude>{{documentation}} |
</noinclude> | </noinclude> | ||
Latest revision as of 15:48, 16 October 2020
A Cambridge Alumni Database. University of Cambridge http://venn.lib.cam.ac.uk/acad/2016/search-2016.html. Missing or empty |title= (help) missing id. missing name.
| This is the template sandbox page for Template:Acad (diff). See also the companion subpage for test cases. |
| This template is a Citation Style 1 specific-source template based on {{Cite encyclopedia}}. For centralised Citation Style 1 discussions, see Help talk:Citation Style 1. |
Contents
Usage
This template is a wrapper template for {{cite encyclopedia}}. It links to the website ACAD (A Cambridge Alumni Database), which is an online enhanced version of Alumni Cantabrigienses, a book that catalogues graduates of Cambridge University through 1900.
{{acad |id= |name=
|volume= |year= |ref= |access-date= |hide errors=}}
Required parameters
- id : the alphanumeric ID (e.g., "DNKS873WA") of the person's biographical entry. It appears in small print in the right-hand column header for each ACAD search result, and can be hard to spot (search within the web page for the phrase "unique identifier").
- name : name of the person/biography
For example:
{{Acad|id=MLN900AA|name=Milne, Alan Alexander}}- "Milne, Alan Alexander (MLN900AA)". A Cambridge Alumni Database. University of Cambridge.
and may also be written:
{{Acad|MLN900AA|Milne, Alan Alexander}}- "Milne, Alan Alexander (MLN900AA)". A Cambridge Alumni Database. University of Cambridge.
Optional parameters
- mode: see
{{cite encyclopedia}}. it defaults to cs1 but can be changed, e.g.:mode=cs2to match the mode used by the{{citation}}template.
- ref: see
{{cite encyclopedia}}. This can be used in combination with {{harv}}, {{harvnb}} and {{sfn}} templates to link short format citations to this one. Unless overridden by the content of|ref=, {{acad}} creates an anchor id using the content of|id=. To link to the {{acad}} citation, use, for example,{{sfn|ACAD|<id>}}where<id>is the value from|id=. - access-date: full date that ACAD was consulted
- hide errors: when set to
yes, hides error messages
Error messages
If required parameters are empty or omitted, the template will add appropriate error messages to the end of the citation.
- missing
id. –|id=is required to create the proper url link to the database; defaults to the database search page; - missing
name. –|name=is required to create the correct title in the rendered citation; |ref=harvnot recommended. – Because {{acad}} does not support a|date=or|year=parameter,|ref=harvwon't produce a meaningful CITEREF anchor id. See|ref=under §Optional parameters.
{{acad}} citations with missing |name= or |id= are placed in the hidden maintenance category Category:ACAD citations missing parameters when those pages are in article namespace.
Related templates
{{vennAC}}– a template for citing Alumni Cantabrigienses facsimiles held at Internet Archive
| The above documentation is transcluded from Template:Acad/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |