Log in

Template:Product slider/doc

From PathfinderWiki
Revision as of 06:07, 4 March 2015 by Oznogon (talk | contribs) (Document)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{Product slider}} generates two slideshow parser functions, one with images and one with links to products. It's designed for use with the New Products box on Pathfinder Wiki.


{{Product slider
| sliderid = 
| refresh  = 

| title1 = 
| image1 = 
| width1 = 
| link1  = 

| title2 = 

{{Product slider}} uses a looping parser function to scale to as many entries as needed, and it tries to be clever when applying variables to require as little markup as possible. In other words, it can be as simple as adding one line per title to create a slider with up to 100 titles.

The image and text sliders are rendered as two table cells with a table row break ( |- ) between them, so it is strongly recommended that this template be used inside of a wikitext table (see example).


sliderid (optional but strongly recommended)
The id parameter for the slider. Each slider on a page must have a unique ID. The image slider automatically suffixes "slider" after the sliderid, and the link slider beneath it automatically suffixes "links". Default is "unidentified".
refresh (optional)
The slider refresh rate in milliseconds. Default is 5,000 (5 seconds).
The title for each item in the slideshow and the link text that appears beneath the image.
imagen (optional)
The image filename, with extension, for the corresponding item. If no imagen parameter is provided, the template uses titlen followed by .jpg. Sliders cannot have items without images.
widthn (optional)
The width of the corresponding item's image. Default is 200px. Height-based measurements, like x200px for a 200-pixel-tall image, are allowed.
linkn (optional)
The link applied to the image and the target for the link text that appears beneath the image. If no linkn parameter is provided, the template uses titlen.


{| class=tantable width=300
{{Product slider
| sliderid = newbook
| refresh  = 1000

| width1 = x260px
| title1 = Strategy Guide

| title2 = Melee Tactics Toolbox

| image3 = Season 6 placeholder.jpg
| title3 = Fires of Karamoss

| title4 = Tombs of Golarion (Companion)
| link4  = Tombs of Golarion

| image5 = Season 6 placeholder.jpg
| title5 = The Golden Guardian
Strategy Guide
Melee Tactics Toolbox
Fires of Karamoss
Tombs of Golarion
The Golden Guardian

Here, because the image filename for title2 (Melee Tactics Toolbox) is exactly Melee Tactics Toolbox followed by .jpg, there's no need to specify the filename using image2—the template automatically slaps .jpg at the end of the title and uses that image. widthn and linkn are optional parameters and default to 200px and titlen, respectively.