Adding alt text and links to MediaWiki's gallery of images
In MediaWiki I want to display a gallery of ima开发者_开发知识库ges with alt text (tool tip) and a link to another page.
This can easily be done for a single image. Does anyone know how to do this for an image gallery?
Thank you wikis for this great answer. It also works without the imagemap extension if you use this code:
{|
|[[File:yourpic.png|x200px|link=yourlink]]<br />[[your link|your caption]] ||
[[File:yourpic2.png|x200px|link=yourlink2]]<br />[[your link 2|your second caption]]
|}
For a demo look at http://www.linuxintro.org
For those interested, there is a workaround. You can put the images in a table. That way you can use the ImageMap functionality for the link and tool tip. You can also add a row below for the caption (which can also be a link).
So, the code is e.g.:
{| style="font-size:85%; border: 2px solid blue;"
|
<imagemap>
File:<image name>|frameless|x80px|center
default [[<link for image>|<tool tip for image>]]
desc none
</imagemap>
|-
|[[<Caption link>]]
|}
精彩评论