Topic on Extension talk:ImageMap

Resizing an ImageMap with parameters

4
Macaddct1984 (talkcontribs)

Hello, I'm trying to make an ImageMap template that accepts a size parameter. I've gotten as far as this and it still isn't working with an input such as: {{X9|400px}} using this at the beginning of the template: {{#tag:imagemap|File:New_Jersey_Counties.svg{{!}}thumb{{!}}right{{!}}{{{1{{!}}200px}}}{{!}}A clickable New Jersey county map ... }} Thanks!

Ciencia Al Poder (talkcontribs)

And what about: {{#tag:imagemap|File:New_Jersey_Counties.svg{{!}}thumb{{!}}right{{!}}{{{1|200px}}}{{!}}A clickable New Jersey county map ... }} ?

Using pipe instead of {{!}} for the parameter separator. At least, if I change the default 200px to something else, the image gets resized, so it should work, although I didn't checked transcluding the template.

Macaddct1984 (talkcontribs)
Ciencia Al Poder (talkcontribs)

Actually, the examples doesn't encode the pipe inside links, as it's not necessary in that context, but it's worth noting it. Done.

Reply to "Resizing an ImageMap with parameters"