v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Random image"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(use frame instead of thumb (doesn't float?))
(Undo revision 249877 by 35.191.3.195 (talk))
Tag: Undo
 
(8 intermediate revisions by 4 users not shown)
Line 10: Line 10:
  
  
:<nowiki>{{random image | dragonpics | size=400x400px | link=dragon }}</nowiki>
+
:<nowiki>{{random image | dragonpics | size=400x400px | location=right | link=dragon }}</nowiki>
  
Adds a random image from "dragonpics", size 400x400px, and link it to "dragon".
+
Adds a random image from "dragonpics", size 400x400px, aligned on the right, and link it to "dragon".
  
<onlyinclude><includeonly>[[{{#splitrand:{{{{{1|/gallery}}}}}}}|frame|{{{size|140x200px}}}|{{#if:{{{link|}}}|link={{{link}}}|border}}]]</includeonly></onlyinclude>
+
<onlyinclude><includeonly>[[{{#splitrand:{{{{{1|/gallery}}}}}}}{{dot}} [[{{{1|/gallery}}}|More]]|{{{type|thumb}}}|{{{location|center}}}|{{{size|140x200px}}}|{{#if:{{{link|}}}|link={{{link}}}|border}}]]</includeonly></onlyinclude>

Latest revision as of 20:28, 22 January 2020

This template returns a random image from a gallery subpage (by default "/gallery"). To add an image to the rotation, edit the appropriate gallery subpage, not this page.


Usage:

{{random image}}

Adds a random image from "/gallery", size 140x200px.


{{random image | dragonpics | size=400x400px | location=right | link=dragon }}

Adds a random image from "dragonpics", size 400x400px, aligned on the right, and link it to "dragon".