Difference between revisions of "Template:Identifier"

From blackwiki
Jump to navigation Jump to search
imported>Headbomb
( )
imported>Frietjes
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{hide in print|1=[[{{{link}}}|{{{display}}}]]{{{separator}}}[{{{base-url-start}}}{{urlencode:{{{id}}}}}{{{base-url-end|}}} {{#tag:nowiki|{{{id}}}}}]<!--
+
{{hide in print|1=[[{{{link}}}|{{{display}}}]]{{{separator}}}[{{{base-url-start}}}{{urlencode:{{if empty|{{{1}}}{{{id}}}}}}}{{{base-url-end|}}} {{#tag:nowiki|{{{id}}}}}]<!--
 
-->{{#switch:{{{access-parameter|}}}
 
-->{{#switch:{{{access-parameter|}}}
 
     |free={{#ifeq:{{{allow-free|}}}|yes|&thinsp;[[File:Lock-green.svg|9px|link=|A free version of this source can be accessed here]]}}
 
     |free={{#ifeq:{{{allow-free|}}}|yes|&thinsp;[[File:Lock-green.svg|9px|link=|A free version of this source can be accessed here]]}}
     |registration={{##ifeq:{{{allow-registration|}}}|yes|&thinsp;[[File:Lock-yellow.svg|9px|link=|A (free) registration is required to access this source]]}}
+
     |registration={{#ifeq:{{{allow-registration|}}}|yes|&thinsp;[[File:Lock-yellow.svg|9px|link=|A (free) registration is required to access this source]]}}
     |trial|limited={{##ifeq:{{{allow-limited|}}}{{{allow-trial|}}}|yes|&thinsp;[[File:Lock-yellow.svg|9px|link=|A free access is provided on a limited trial basis, but a subscription is normally required to access this source]]}}
+
     |limited={{#ifeq:{{{allow-limited|}}}|yes|&thinsp;[[File:Lock-yellow.svg|9px|link=|A free access is provided on a limited trial basis, but a subscription is normally required to access this source]]}}
     |subscription={{##ifeq:{{{allow-subscription|}}}|yes|&thinsp;[[File:Lock-red.svg|9px|link=|A (paid) subscription is required to access this source]]}}
+
     |subscription={{#ifeq:{{{allow-subscription|}}}|yes|&thinsp;[[File:Lock-red.svg|9px|link=|A (paid) subscription is required to access this source]]}}
 
     |
 
     |
 
   }}
 
   }}
 
}}<!--
 
}}<!--
-->{{only in print|{{{display}}}{{{separator}}}{{#tag:nowiki{{{id}}}}}<!--
+
-->{{only in print|{{{display}}}{{{separator}}}{{#tag:nowiki{{if empty|{{{1}}}{{{id}}}}}}}<!--
 
-->{{#switch:{{{access-parameter|}}}
 
-->{{#switch:{{{access-parameter|}}}
 
     |free={{#ifeq:{{{allow-free|}}}|yes|&thinsp;[[File:Lock-green.svg|9px]]}}
 
     |free={{#ifeq:{{{allow-free|}}}|yes|&thinsp;[[File:Lock-green.svg|9px]]}}
 
     |registration={{#ifeq:{{{allow-registration|}}}|yes|&thinsp;[[File:Lock-yellow.svg|9px]]}}
 
     |registration={{#ifeq:{{{allow-registration|}}}|yes|&thinsp;[[File:Lock-yellow.svg|9px]]}}
     |limited|trial={{#ifeq:{{{allow-limited|}}}{{{allow-trial|}}}|yes|&thinsp;[[File:Lock-yellow.svg|9px]]}}
+
     |limited={{#ifeq:{{{allow-limited|}}}|yes|&thinsp;[[File:Lock-yellow.svg|9px]]}}
 
     |subscription={{#ifeq:{{{allow-subscription|}}}|yes|&thinsp;[[File:Lock-red.svg|9px]]}}
 
     |subscription={{#ifeq:{{{allow-subscription|}}}|yes|&thinsp;[[File:Lock-red.svg|9px]]}}
 
     |
 
     |

Latest revision as of 12:12, 11 October 2019

[[{{{link}}}|{{{display}}}]]{{{separator}}}[{{{base-url-start}}}%3Cstrong+class%3D%22error%22%3E%3Cspan+class%3D%22scribunto-error%22+id%3D%22mw-scribunto-error-0%22%3EScript+error%3A+No+such+module+%26quot%3BIf+empty%26quot%3B.%3C%2Fspan%3E%3C%2Fstrong%3E {{{id}}}]Template:Only in print

50px Template documentation[view] [edit] [history] [purge]

Usage

This a meta template for identifiers.

arxiv

to do

bibcode
{{Identifier
 |link=bibcode (identifier)
 |display=Bibcode
 |separator=: 
 |id={{{1}}}
 |base-url-start=http://adsabs.harvard.edu/abs/
 |access-parameter={{{bibcode-access}}}
 |allow-free=yes
 |allow-registration=no
 |allow-limited=no
 |allow-subscription=no
}}

Gives

doi
{{Identifier
 |link=doi (identifier)
 |display=doi
 |separator=:
 |id={{{1}}}
 |base-url-start=https://doi.org/
 |access-type={{{doi-access}}}
 |allow-free=yes
 |allow-registration=yes
 |allow-limited=yes
 |allow-subscription=no
}}

Gives

See also