Template:OL author: Difference between revisions
Appearance
Content deleted Content added
m Not sandbox; |
IznoRepeat (talk | contribs) m →top: phab:T337149#8953569, replaced: [// → [https:// |
||
(11 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> |
<includeonly>{{#if:{{{id|{{{1|{{#property:P648}}}}}}}}|[https://openlibrary.org/authors/OL{{#invoke:String|match|{{{id|{{{1|{{#property:P648}}}}}}}}|%s*(%d+A)%s*$|nomatch=}} Works by {{{cname|{{{2|{{PAGENAMEBASE}}}}}}}}] at [[Open Library]]{{EditAtWikidata|pid=P648|{{{id|{{{1|}}}}}}}}{{#if:{{{id|}}}{{{1|}}}|{{WikidataCheck|property=P648|value={{{id|{{{1|}}}}}}|category=Open Library ID}}}}{{main other|[[Category:Articles with Open Library links]]}}|{{Error|No openlibrary ID.}}}}</includeonly><noinclude> |
||
{{Documentation}} |
{{Documentation}} |
||
</noinclude> |
</noinclude> |
Latest revision as of 22:23, 25 July 2023
This template uses the Wikidata property:
- Open Library ID (P648) (see uses)
This template uses Lua: |
This template generates a link for browsing an author's works on Open Library.
Usage
One of:
- {{OL author}}
- {{OL author|id=id of the author as specified at openlibrary.org|cname=name to be displayed}}
The former fetches the ID from Wikidata and takes the name from the page name.
|id=
is the openlibrary id in the form ####A where #### is a series of one or more digits; do not include 'OL' prefix
|cname=
is an optional parameter for the name to be displayed – if omitted, uses page name
Examples
- Code
{{OL author|21491A}}
- Result
Works by OL author at Open Library – no name provided so use page name
- Code
{{OL author|id=21491A|cname=Jack Kerouac}}
- Result
Works by Jack Kerouac at Open Library
Tracking categories
- Category:Open Library ID not in Wikidata (105)
- Category:Open Library ID different from Wikidata (567)
- Category:Open Library ID same as Wikidata (146)
- Category:Articles with Open Library links (1,663)