Forum

Thread tagged as: Question, Gallery

Gallery - Number images within album view

Good morning,

I am looking to add image numbers to my Gallery album view, ideally before the 'ImageAlt' (and without manually numbering the images within the image title itself).

Here is my current code:

<!-- Album view -->

<perch:before>

    <ul class="imagelisting glist">
</perch:before>
    <li>
        <a href="<perch:gallery id="main" />" rel="lightbox[examples]" title="<perch:gallery id="desc" type="textarea" />">
            <img src="<perch:gallery id="small" />" width="<perch:gallery id="small-w" />" height="<perch:gallery id="small-h" />" alt="<perch:gallery id="imageAlt" />" />
        </a>
        <p><perch:gallery id="imageAlt" /></p>
    </li>
<perch:after>
    </ul><div class="cf" /></div>
</perch:after>

Any help gratefully received.

Ric Furness

Ric Furness 0 points

  • 4 years ago
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hello Ric!

You can use perch_item_index:

<perch:gallery id="perch_item_index" />

More on this in the documentation

Just the ticket, Hussein. Thank you!