Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Björn Jönsson 37 posts 58 karma points
    Mar 24, 2010 @ 08:56
    Björn Jönsson
    0

    Runway´s Photogallery

    I think I have found a bug here in the xslt-files: "galleryListAlbums.xslt" and "galleryListPhotos.xslt".

    Some background on the problem: I have build a site for a customer that wanted a photogallery so i installed Runway´s module (Photo)Gallery and made a bulk upload of 26 images and the site looked awful, only the two first rows had 5 images each (they were "wrapped" by the class runwayGallery) most of the rest of the images weren´t wrapped. Result: they were displayed as a bulleted list.

    My little workaround was the last if case that handles the "wrapping" that is ulClose, the first i think is untouched and should look like this:

            <xsl:if test="position() = 1 or position() mod $imagesPerRow = 0">
                <xsl:value-of select="$ulOpen" disable-output-escaping="yes" />
            </xsl:if>

    the second and last if case should look like this:

           <xsl:if test="position() = $imagesPerRow or position() mod $imagesPerRow = 0 or position() = last()">
    <xsl:value-of select="$ulClose" disable-output-escaping="yes"/>
    </xsl:if>

    The problem was that you took (ImagesPerRow - 1) that is you never got that last position "filled" if you had ImagesPerRow = 5, it resulted in rows that descended eg. they became 4, and 3, and 2 and at last the last rows were only 1 ImagePerRow.

    I hope this little fix has solved a problem for someone else than me.

    Kind regards

    Björn Jönsson

  • Andreas Paulsson 9 posts 29 karma points
    Mar 29, 2010 @ 09:00
    Andreas Paulsson
    0

    I have made similar changes:

    <xsl:if test="position() mod $imagesPerRow = 1">
           <xsl:value-of select="$ulOpen" disable-output-escaping="yes" />
    </xsl:if>

    and

    <xsl:if test="position() mod $imagesPerRow = 0 or position() = last()">
    <xsl:value-of select="$ulClose" disable-output-escaping="yes"/>
    </xsl:if>

    which I think is more correct since position() is 1-based (first item has index 1).

     

    /Andreas

  • Geoff Baldwin 80 posts 100 karma points
    Sep 28, 2010 @ 14:43
    Geoff Baldwin
    0

    @Andreas-- many thanks - found this post looking for a solution to 'bulletted' images in the gallery. Works a treat!!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies