Template:IMDb name: Difference between revisions

no edit summary
(Created page with "[https://www.imdb.com/{{#if: {{{1|{{{id|}}}}}} | name/{{#ifeq: {{Str left|{{{1|{{{id}}}}}}|2}} | nm | {{Trim|{{{1|{{{id}}}}}}}}/ | nm{{#ifexpr: {{Str len|{{{1|{{{id}...")
 
No edit summary
Line 10: Line 10:
     | name/{{First word|1={{#property:P345}}|sep=,}}/
     | name/{{First word|1={{#property:P345}}|sep=,}}/
     | find?q={{urlencode:{{PAGENAME}}}}&s=nm
     | find?q={{urlencode:{{PAGENAME}}}}&s=nm
    }}
  }}{{#if: {{{1|}}} {{{id|}}} {{#property:P345}} | {{#switch: {{lc:{{{section|}}}}}
  | award | awards = awards Awards for | biography | bio = bio Biography for
  }}}} {{#if: {{{2|{{{name|}}}}}}
  | {{{2|{{{name}}}}}}
  | {{PAGENAMEBASE}}
  }}] on [[IMDb]]<includeonly>{{#if: {{{1|{{{id|}}}}}}{{#property:P345}}
  | {{EditAtWikidata|pid=P345|nbsp=yes|{{{1|{{{id|}}}}}}}}
  | {{Main other|[[Category:IMDb template with no id set]]}}
  }}{{#ifeq: {{Str left|{{{1|{{{id}}}}}}|2}} | nm
  | {{#ifexpr: {{Str len|{{{1|{{{id}}}}}}}} < 9 or {{Str len|{{{1|{{{id}}}}}}}} > 10
    | {{Main other|[[Category:IMDb template with invalid id set]]}}{{#invoke:Preview warning|main|IMDb ID starting with ''nm'' should be followed by seven or eight digits, such as ''nm0000567'' or ''nm12345678''}}
    }}
  | {{#ifexpr: {{Str len|{{{1|{{{id}}}}}}}} > 8
    | {{Main other|[[Category:IMDb template with invalid id set]]}}{{#invoke:Preview warning|main|IMDb ID should not contain more than eight digits}}
     }}
     }}
   }}</includeonly><noinclude>
   }}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>