Template:FileCaption/doc
Jump to navigation
Jump to search
Template Experimenting with an image at the top right of the page, on the same line as the Page Title.
How big the image can be is determined by (a) <h1> lineheight (1.3) and (b) <h1> top margin (0). An image taller than 50px is obscured by the Search box.
Path is set to http://wikipolitiks.local/Images/
Usage
{{Img Title
|image-name.png - the filename of the image
|50 - width
|50 - height
}}
Example
{{Img Title|Influencers.svg|50|50}}
Gives the image at the top right of this page. Template:Img Title
ToDo
This template only works for external images, ie. not stored in the database. It doesn't seem possible to have an internal link - I want to link to the top-level Category, eg. "Category:Influencers". See https://www.mediawiki.org/wiki/Help:Images
For internal images, I will have to do the following; the downside is that the height is hard-wired in:
Put a style in MediaWiki:Common.css
.img-title { position:absolute; top:-50px; right:0; }
Then:
[[File:Influencers.svg|50x50px|link=Category:Influencers]]