Template:IMDb title: Difference between revisions

From WikiMD's Wellness Encyclopedia

No edit summary
No edit summary
 
Line 1: Line 1:
<includeonly>
<includeonly>
[https://www.imdb.com/{{#if: {{{1|{{{id|}}}}}}
{{#if: {{{id|}}} |
   | title/{{#if: {{#ifexpr: {{#pos:{{{1|{{{id|}}}}}}|tt}} = 0}}
   [https://www.imdb.com/title/tt{{{id}}}/ {{{title|IMDb}}}]
      | {{padleft:{{{1|{{{id}}}}}}|9|0}}
}}
      | tt{{padleft:{{{1|{{{id|}}}}}}|7|0}}
</includeonly>
    }}
<noinclude>
  | find?q={{urlencode:{{PAGENAMEBASE}}}}&s=tt
== Documentation ==
  }}{{#switch: {{lc:{{{section|}}}}}
This template generates a link to a specific IMDb page for a movie or TV show.
  | award | awards = awards Awards for
  | cast = fullcredits Full cast and crew of
  }} {{#if: {{{quotes|}}}
      | "{{{title|{{{2|{{PAGENAMEBASE}}}}}}}}"
      | ''{{{title|{{{2|{{PAGENAMEBASE}}}}}}}}''
    }} {{{3|{{{description|}}}}}}] at {{#if: {{{link_hide|}}} | IMDb | [[IMDb (identifier)|IMDb]] }}
</includeonly><noinclude>


== Usage ==
=== Usage ===
This template generates a link to an IMDb page for a specific title or search query.
<syntaxhighlight lang="mediawiki">
{{IMDb|id=IMDB_ID|title=Custom Link Text}}
</syntaxhighlight>
 
=== Parameters ===
* `id` - The IMDb ID of the movie or TV show (mandatory).
* `title` - The text to display for the link (optional, defaults to "IMDb").


=== Example ===
=== Example ===
<syntaxhighlight lang="mediawiki">
<syntaxhighlight lang="mediawiki">
{{IMDb title|id=tt1234567|title=Example Movie|section=cast|description=Full cast and crew}}
{{IMDb|id=0082010|title=An American Werewolf in London}}
</syntaxhighlight>
</syntaxhighlight>


=== Parameters ===
Produces:
* `id` or `1` - IMDb title ID (e.g., tt1234567). If blank, performs a search for the page name.
[https://www.imdb.com/title/tt0082010/ An American Werewolf in London]
* `title` or `2` - Title text to display.
* `section` - IMDb section (e.g., `cast`, `awards`).
* `description` or `3` - Additional descriptive text.
* `link_hide` - Hides the word "IMDb" when set.
 
=== Result ===
- With ID: Links to a specific title page on IMDb.
- Without ID: Performs a search query for the page title on IMDb.


== Notes ==
=== Notes ===
* IMDb title IDs **must** start with `tt` followed by 7 or 8 digits (e.g., `tt1234567`).
- The `id` parameter must be provided for the link to work.
* Invalid IDs are not processed, and a search query is generated instead.
- If `title` is not specified, the link text defaults to "IMDb."
- Ensure the IMDb ID is correct, including only the numeric portion (e.g., `0082010`).


</noinclude>
</noinclude>

Latest revision as of 00:21, 7 January 2025


Documentation[edit]

This template generates a link to a specific IMDb page for a movie or TV show.

Usage[edit]

{{IMDb|id=IMDB_ID|title=Custom Link Text}}

Parameters[edit]

  • `id` - The IMDb ID of the movie or TV show (mandatory).
  • `title` - The text to display for the link (optional, defaults to "IMDb").

Example[edit]

{{IMDb|id=0082010|title=An American Werewolf in London}}

Produces: An American Werewolf in London

Notes[edit]

- The `id` parameter must be provided for the link to work. - If `title` is not specified, the link text defaults to "IMDb." - Ensure the IMDb ID is correct, including only the numeric portion (e.g., `0082010`).