Difference between revisions of "Module:Main page image/doc"
Jump to navigation
Jump to search
test>Coffeeandcrumbs m (Coffeeandcrumbs moved page Module:Main Page image/doc to Module:Main page image/doc without leaving a redirect: consistent titles) |
m (6 revisions imported) |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | This module provides utility for {{tl| | + | This module provides utility for wrappers of {{tl|Main page image}}. |
== Usage == | == Usage == | ||
| − | <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|width|''ImageTitle''}}</code> Get | + | <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|width|''ImageTitle''}}</code> Get image width from ImageTitle. |
| + | |||
| + | ''ImageTitle'' must not contain the namespace prefix (eg "File:"). You can use {{t|Remove file prefix}} to strip it, if it exists, when sanitising template params. Example: <code><nowiki>{{#invoke:Main page image|width|{{Remove file prefix|{{{image}}}}}}}</nowiki></code> | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | ||
Latest revision as of 14:45, 7 September 2020
This module provides utility for wrappers of {{Main page image}}.
Usage
{{#invoke:Main page image|width|ImageTitle}} Get image width from ImageTitle.
ImageTitle must not contain the namespace prefix (eg "File:"). You can use Template:T to strip it, if it exists, when sanitising template params. Example: {{#invoke:Main page image|width|{{Remove file prefix|{{{image}}}}}}}