Difference between revisions of "Template:Librivox author"

From blackwiki
Jump to navigation Jump to search
imported>Primefac
m (Changed protection level for "Template:Librivox author": high-risk template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)))
imported>Zyxw
(Enable optional use of Wikidata property. Tested first with /sandbox.)
Line 1: Line 1:
[https://librivox.org/{{#if: {{{id|}}} |author/{{{id}}}|search?q={{{1}}}&search_form=advanced}} Works by {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}] at [[LibriVox]] (public domain audiobooks) [[File:Speaker Icon.svg|15px|link=|alt=]]{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Articles with LibriVox links]]|}}<noinclude>
+
{{#if: {{{1<includeonly>|</includeonly>}}} {{{id|}}} {{#property:P1899}}
 +
 
 +
| [https://librivox.org/{{#if: {{{id|}}}
 +
  | author/{{{id}}}
 +
  | {{#if: {{{1|}}}
 +
    | search?q={{{1}}}&search_form=advanced
 +
    | {{#if: {{#property:P1899}}
 +
      | author/{{#property:P1899}}
 +
      }}
 +
    }}
 +
  }} Works by {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}] at [[LibriVox]] (public domain audiobooks) [[File:Speaker Icon.svg|15px|link=|alt=]]{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Articles with LibriVox links]]|}}<includeonly>{{EditAtWikidata|pid=P1899|{{{1|{{{id|}}}}}}}}</includeonly>
 +
 
 +
| <span class="error">&#123;&#123;[[Template:Librivox author|Librivox author]]&#125;&#125; template missing ID and not present in Wikidata.</span>
 +
 
 +
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
<!--Please add this template's categories to the /doc subpage, not here - thanks!-->
 
<!--Please add this template's categories to the /doc subpage, not here - thanks!-->
 
</noinclude>
 
</noinclude>

Revision as of 20:26, 15 October 2020

Works by Template:PAGENAMEBASE at LibriVox (public domain audiobooks) File:Speaker Icon.svg

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

Template:Uses Wikidata Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).

Usage

Unnamed parameters:

Template:Tlcw
Template:Tlcw

Named parameters:

Template:Tlcw
Template:Tlcw

Using Wikidata property Template:Property:

Template:Tlcw
Template:Tlcw

Examples

Unnamed parameters (search page)

Usage
* {{Librivox author|Albert+Einstein|Albert Einstein}}
Output
URL
https://librivox.org/search?q=Albert+Einstein&search_form=advanced

Named parameters (author page)

Usage
* {{Librivox author|id=1035|title=Albert Einstein}}
Output
URLs
https://librivox.org/author/1035

No parameters and no ID in Wikidata

Usage
* {{Librivox author}}
Output

Notes

  • Note the "+" sign replaces [space] in the first example. This leads to a search result page. To go direct to the author page, use the "id=" switch.
  • The optional "id=##" is for linking directly to authors page bypassing the search page. eg. http://librivox.org/author/1035
  • See {{Librivox book}} for individual books.

See also