Template:Gallery Section: Difference between revisions

Template page
mNo edit summary
mNo edit summary
Line 9: Line 9:
  |{{#ifeq: {{#var:ONE}} | Main Artwork
  |{{#ifeq: {{#var:ONE}} | Main Artwork
   |<!-- if this section is a Main Artwork section,
   |<!-- if this section is a Main Artwork section,
         then we sort first by Date and second by
         then we sort by Date.
        alphabetical order
     -->{{#switch:{{{4}}}
     -->Main Artwork{{#switch:{{{4}}}
         |h2=<h2>{{#if:{{{5|}}}|{{{5}}}|{{{2}}}}}</h2>
         |h2=<h2>{{#if:{{{5|}}}|{{{5}}}|{{{2}}}}}</h2>
         |h3=<h3>{{#if:{{{5|}}}|{{{5}}}|{{{2}}}}}</h3>
         |h3=<h3>{{#if:{{{5|}}}|{{{5}}}|{{{2}}}}}</h3>
Line 18: Line 17:
         [[Category:{{{1}}}]]
         [[Category:{{{1}}}]]
         [[Category:{{{2}}}]]
         [[Category:{{{2}}}]]
        [[Category:{{{3|}}}]]
         |?caption
         |?caption
         |?Date
         |?Date
Line 25: Line 23:
         |captionproperty=?caption
         |captionproperty=?caption
         |sort=?Date
         |sort=?Date
        |order=ascending, ascending
         |perrow=7
         |perrow=7
         |limit=10000
         |limit=10000
       }}
       }}
   |<!-- else don't sort by date
   |<!-- else don't sort by date
     -->Not Main Artwork {{#switch:{{{4}}}
     -->{{#switch:{{{4}}}
         |h2=<h2>{{#if:{{{5|}}}|{{{5}}}|{{{2}}}}}</h2>
         |h2=<h2>{{#if:{{{5|}}}|{{{5}}}|{{{2}}}}}</h2>
         |h3=<h3>{{#if:{{{5|}}}|{{{5}}}|{{{2}}}}}</h3>
         |h3=<h3>{{#if:{{{5|}}}|{{{5}}}|{{{2}}}}}</h3>

Revision as of 07:38, 23 November 2017

Description

A helper/sub-template of Template:Master Gallery.

Creates a section header with the specified depth (h2, h3, h4, h5), and a gallery of all images that contain the two specified tags. If there are no images in the specified gallery, this code will not do anything. (That is, it is safe to call even when "Kagura Mutsuki" does not have images in the category "XBlaze" -- an extraneous "XBlaze" header will not appear on Kagura's gallery page.)

Template Usage

{{ Gallery Section
  | Kagura Mutsuki  <-- {{{1}}} Image category 1 (this must be the CHARACTER'S NAME)
  | Main Artwork    <-- {{{2}}} Image category 2
  |                 <-- {{{3}}} Image Category 3 (optional)
  | h2              <-- {{{4}}} Header depth (h2, h3, h4, h5)
  | Main Artwork    <-- {{{5}}} Section header (optional, will default to {{{2}}} )
}}

ie. {{ Gallery Section | Kagura Mutsuki | Main Artwork | | h2 }}
ie. {{ Gallery Section | Kagura Mutsuki | Chrono Phantasma | Story | h3 | Chrono Phantasma }}