Template:AllMovie title: Difference between revisions

From WikiMD's Wellness Encyclopedia

m 1 revision imported
 
No edit summary
Line 1: Line 1:
{{#if: {{{id<includeonly>|</includeonly>}}} {{{1|}}} {{#property:P1562}}
<includeonly>
{{#if: {{{id|{{{1|}}}}}}
  | [https://www.allmovie.com/movie/{{#if: {{{id|{{{1|}}}}}}  
      | v{{{id|{{{1}}}}}}
      | {{PAGENAMEBASE}}
    }}{{#if: {{{tab|}}} | /{{{tab}}}}}  
    ''{{#if: {{{title|{{{2|}}}}}} | {{{title|{{{2}}}}}} | {{PAGENAMEBASE}} }}'' at [[AllMovie]]
  | {{Error|The template is missing an ID and cannot fetch the AllMovie title.}}
}}
</includeonly>


| [https://www.allmovie.com/movie/{{#if: {{{id|{{{1<includeonly>|</includeonly>}}}}}} | v{{Trim|{{{id|{{{1}}}}}}}} | {{First word|{{#property:P1562}}|sep=,}} }}{{#switch: {{lc:{{{tab|}}}}}||review=|#default=/{{{tab}}}}} ''{{#if: {{{title|{{{2|}}}}}} | {{{title|{{{2}}}}}} | {{PAGENAMEBASE}} }}''] at [[AllMovie]]<includeonly>{{EditAtWikidata|pid=P1562|{{{id|{{{1|}}}}}}}}{{ns0|{{#ifeq:{{#invoke:String|find |source={{#if:{{{id|{{{1|}}}}}}|v{{Trim|{{{id|{{{1}}}}}}}}|{{#property:P1562}}}} |target=vm?%d |plain=false}}|1||{{Error|Invalid ID.}}[[Category:AllMovie titles with invalid value]]}}}}</includeonly>
<noinclude>
== Usage ==
This template generates a link to an AllMovie title page. It requires either a valid **AllMovie ID** or defaults to searching by the page name.


| {{Error|{{tl|AllMovie title}} template missing ID and not present in Wikidata.}}<includeonly>[[Category:AllMovie titles with invalid value]]</includeonly>
=== Example ===
<syntaxhighlight lang="mediawiki">
{{AllMovie title|id=12345|title=Example Movie|tab=review}}
</syntaxhighlight>
 
=== Parameters ===
* `id` or `1` - The AllMovie ID (required).
* `title` or `2` - Custom display title for the link.
* `tab` - Optional tab on the AllMovie page (e.g., `review`, `awards`).
 
== Outputs ==
- If '''ID''' is provided:
  `[https://www.allmovie.com/movie/v12345/review ''Example Movie''] at [[AllMovie]]`
- If no ID is provided:
  An error message will display.
 
=== Notes ===
* Use `tab` for linking to sections like "review" or "awards".
* If ID is missing, a default error message will show.


}}<includeonly>{{#ifeq:{{lc:{{{tab|}}}}}|review|{{Main other|[[Category:AllMovie titles with a tab value of review]]}}}}</includeonly><!-- Tracking categories
-->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using AllMovie title with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:AllMovie title]] with unknown parameter "_VALUE_"|showblankpositional=1| 1 | 2 | id | tab | title }}<!--
--><noinclude>
{{Documentation}}<!-- Please add categories to the /doc subpage & add interwikis to Wikidata. -->
</noinclude>
</noinclude>

Revision as of 15:14, 17 December 2024


Usage

This template generates a link to an AllMovie title page. It requires either a valid **AllMovie ID** or defaults to searching by the page name.

Example

{{AllMovie title|id=12345|title=Example Movie|tab=review}}

Parameters

  • `id` or `1` - The AllMovie ID (required).
  • `title` or `2` - Custom display title for the link.
  • `tab` - Optional tab on the AllMovie page (e.g., `review`, `awards`).

Outputs

- If ID is provided:

 `Example Movie at AllMovie`

- If no ID is provided:

 An error message will display.

Notes

  • Use `tab` for linking to sections like "review" or "awards".
  • If ID is missing, a default error message will show.