From Open Source Ecology
Jump to: navigation, search


A gallery in Mediawiki is a set of thumbnails, boxes, and text - that display pictures in an automatically tiled format.

OSE also uses a Visual History - which is small pictures of parts uploaded, with newest at the top left, uploaded so that design evolution can be traces from beginning to end. It is a good practice to highlight a changed or added part within FreeCAD, such as this example.

Also, for Gallery entries, put the newest part on top so new changes are readily visible to newcomers.

See example of extensive part libraries using the Gallery feature at, for example, D3D Pro#CAD.

The Gallery should have a link to the CAD file and other information right there as a direct link.

To upload the image thumbnail, we upload to the visual history, and make the image appear both in the visual history and the part thumbnail.


Gallery template:

Visual History:


From MediaWiki

Mode parameter

Starting in 1.22 a mode parameter is available, taking options as follows:

  • traditional is the original gallery type used by MediaWiki.
  • nolines is similar to traditional, but with no border lines.
  • packed causes images to have the same height but different widths, with little space between the images. The rows in this responsive mode organize themselves according to the width of the screen.
  • packed-overlay shows the caption overlaid on the image, in a semi-transparent white box.
  • packed-hover is similar to packed-overlay, but with the caption and box only showing up on hover.
  • slideshow creates a slideshow of the images.

Optional gallery attributes

The gallery tag itself takes several additional parameters, specified as attribute name-value pairs:

<gallery {parameters}>
  • caption="{caption}": (caption text between double quotes for more than a word) sets a caption centered atop the gallery. Only plain text may be used in the caption; formatting, templates and the like will not work.
  • widths={width}px: sets the (max) widths of the images; the default value is 120px. Note the plural: widths.
  • heights={heights}px: sets the (max) heights of the images; the default value is 120px.
  • perrow={integer}: sets the number of images per row. 0 means automatically adjust based on width of screen.
  • showfilename={anything}: Show the filenames of the images in the individual captions for each image (1.17+).
  • mode={traditional|nolines|packed|packed-hover|packed-overlay|slideshow}: See section above (1.22+; 1.28+ for "slideshow").
  • showthumbnails: For "slideshow" mode only, display the strip with image thumbnails below the slideshow by default (1.29+).