Hi Stefan, i really do appreciate your attempts at helping me with this but you will have to bare with me, im a complete novice at this!
There has been a slight change. Ive been told by the data providers at Dezrez that i can page through results by passing a 'page' parameter to the search query. And also the url to query the results changed from http://data.dezrez.com/Search.ASP to http://www.dezrez.com/drapp/search.asp. So, in my XML module ive modified the url and set up a parameter as follows: page - Pass-Through Querystring (page). So my XML options now look like this
This is working fine and when i search an example of the url results look like as follows: http://www.lesixtysix.fr/BeautifulSouth/Results/tabid/119/Default.aspx?property_type=65&minprice=100000&maxprice=300000&page=1
If i manually change the page url e.g http://www.lesixtysix.fr/BeautifulSouth/Results/tabid/119/Default.aspx?property_type=65&minprice=100000&maxprice=300000&page=2 it all works fine and page 2 results are shown.
Now, my XSL looks like this and outputs the page results links:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:output method="html"/>
<div class="page">
<div class="pages">
<xsl:if test="//properties/pages/@number>1">
<xsl:if test="//properties/@page>1">
<a><xsl:attribute name="href"> document.form.page.value='1';document.form.submit();</xsl:attribute><<|</a>
</xsl:if>
<xsl:for-each select="//pages/page">
<xsl:if test="@hidden">
<xsl:choose>
<xsl:when test="@selected">
<xsl:choose >
<xsl:when test="@number=1">
<!--when first property-->
</xsl:when>
<xsl:otherwise>
<a ><xsl:attribute name="href"> document.form.page.value='<xsl:value-of select="@number - 1"/>';document.form.submit();</xsl:attribute>Previous</a>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:for-each>
<span class="pagenumbers">
<xsl:for-each select="//pages/page">
<xsl:if test="@hidden=0">
<xsl:choose>
<xsl:when test="@selected">
<span class="selected"><xsl:value-of select="@number"/></span>
</xsl:when>
<xsl:otherwise>
<a><xsl:attribute name="href"> document.form.page.value='<xsl:value-of select="@number"/>';document.form.submit();</xsl:attribute><xsl:value-of select="@number"/></a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</span>
<xsl:for-each select="//pages/page">
<xsl:if test="@hidden">
<xsl:choose>
<xsl:when test="@selected">
<xsl:choose >
<xsl:when test="@number=//properties/pages/@number">
<!--when last property-->
</xsl:when>
<xsl:otherwise>
<a><xsl:attribute name="href"> document.form.page.value='<xsl:value-of select="@number + 1"/>';document.form.submit();</xsl:attribute>Next</a>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:for-each>
<xsl:if test="//properties/@pagecount > //properties/@page">
<a><xsl:attribute name="href"> document.form.page.value='<xsl:value-of select="//properties/pages/@number"/>';document.form.submit();</xsl:attribute>|>></a>
</xsl:if>
</xsl:if>
</div>
<div class="content">
<xsl:choose>
<xsl:when test="//properties/@total > 0">
<xsl:call-template name="pagestop"/>
<div id="properties">
<xsl:apply-templates select="properties"/>
</div>
<xsl:call-template name="pagesbottom"/>
</xsl:when>
<xsl:otherwise>
<div class="noresults">Your search has returned 0 results. Please expand your search criteria and try again.</div>
</xsl:otherwise>
</xsl:choose>
</div>
<div class="footer">
<a href="http://www.dezrez.com/" target="_top">
<img src="http://www.dezrez.com/drapp/EstateAgents/dezrezgraphic.gif" border="0"/>
</a>
</div>
</div>
</xsl:template>
<xsl:template match="properties">
<xsl:for-each select="property">
<div class="property">
<div class="image">
<a>
<xsl:attribute name="HREF">http://www.lesixtysix.fr/BeautifulSouth/Results/tabid/119/Default.aspx?PropertyID=<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:if test="@picture = 1">
<img border="0" class="dezrez-thumb">
<xsl:attribute name="SRC">http://www.dezrez.com/drapp/EstateAgents/<xsl:value-of select="@eid"/>/<xsl:value-of select="@ebid"/>/<xsl:value-of select="@id"/>_1t.jpg</xsl:attribute>
</img>
</xsl:if>
<xsl:if test="@picture = 0 ">
<img src="http://www.dezrez.com/drapp/Images/AwaitingPhoto.jpg" border="0" class="dezrez-thumb"/>
</xsl:if>
</a>
</div>
<div class="addressprice">
<div class="address">
<xsl:value-of select="num"/>: <xsl:value-of select="twn"/>
</div>
<div class="price">
<xsl:choose>
<xsl:when test="@price='P.O.A.'">
P.O.A.
</xsl:when>
<xsl:otherwise>
€<xsl:value-of select="@priceval"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="@price != @priceconv and @price!='P.O.A.'"></xsl:if>
</div>
</div>
<div class="addressprice">
Bedrooms: <xsl:value-of select="@bedrooms"/> Bathrooms: <xsl:value-of select="@bathrooms"/> Garage:
<xsl:choose>
<xsl:when test="@garages='0'">
<span>No</span>
</xsl:when>
<xsl:otherwise>
<span>Yes</span>
</xsl:otherwise>
</xsl:choose> Garden:
<xsl:choose>
<xsl:when test="@gardens='0'">
<span>No</span>
</xsl:when>
<xsl:otherwise>
<span>Yes</span>
</xsl:otherwise>
</xsl:choose>
</div>
<div class="description">
<div align="justify"><xsl:value-of select="concat(substring(description, 1, 300), '...')"/></div>
</div>
<div class="links">
<a>
<xsl:attribute name="HREF">http://www.lesixtysix.fr/BeautifulSouth/Results/tabid/119/Default.aspx?PropertyID=<xsl:value-of select="@id"/>
</xsl:attribute>Read more...</a>
<span class="propertyid" style="display:none">
id=<xsl:value-of select="@id"/>
</span>
</div>
<div style="clear:both"></div>
</div>
</xsl:for-each>
</xsl:template>
<xsl:template name="pagestop">
<div class="portfolioMessage" id="portfolioMessage">
</div>
</xsl:template>
<xsl:template name="pagesbottom">
</xsl:template>
</xsl:stylesheet>
I want the page results links to change the 'page=' at the end of the results url to the appropriate page number so that users can page through the various results.
Ive tried to follow your steps but getting nowhere. Please please please tell me what i need to do to configure this. Ive no idea what to do. Im sorry.