Image Gallery Problem

Hi! :slight_smile:

I currently have an XSLT Image Gallery script

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet 
	version="1.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
	xmlns:msxml="urn:schemas-microsoft-com:xslt"
	xmlns:umbraco.library="urn:umbraco.library" xmlns:Examine="urn:Examine" 
	exclude-result-prefixes="msxml umbraco.library Examine ">


<xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:variable name="mediaFolderId" select="number($currentPage/mediaFolderId)" />
    <xsl:variable name="thumbWidth" select="number(256)" />
    <xsl:variable name="thumbHeight" select="number(170)" />

    <xsl:template match="/">

        <!-- Displays all images from a folder in the Media Library -->

        <xsl:if test="number($mediaFolderId)">

            <div id="Gallery">
				<ul>
					<xsl:for-each select="umbraco.library:GetMedia($mediaFolderId, true())/Image">
						<xsl:if test="umbracoFile !=''">
							<li class="col-lg-2 col-md-2 col-sm-3 col-xs-4">
								<a href="{umbracoFile}" title="{@nodeName}" rel="gallery">
									<img src="/imageGen.ashx?image={umbraco.library:UrlEncode(umbracoFile)}&amp;width={$thumbWidth}&amp;height={$thumbHeight}"  alt="{@nodeName}" title="{@nodeName}" class="thumbnail" />
								</a>
							</li>
						</xsl:if>
					</xsl:for-each>
				</ul>
			</div>

        </xsl:if>

    </xsl:template>   
</xsl:stylesheet>

But i would like to get paging on, so after 10 or 20 images it makes a new page, but i can’t figure it out :confused:

I don’t know if it would be easier to make it an Partial View Macro?

I just got this from a friend, but he don’t know how to make paging on it xD


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/60920-image-gallery-problem