Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have some XSLT code which displays 10 records/nodes and limiting them to 10. When a user creates more than 10 nodes/pages, how could I set the page up so when they click Next it goes to the next 10 listing and clicking Previous goes back? Thanks
Hi J
Show your code, please.
Alex
Hello Alex, see below
<xsl:template match="/"> <!-- Use the applicaple root variable here ($absRoot to search entire solution, $siteRoot within current site) --> <article class="post"> <xsl:for-each select="$absRoot//*[name() = $documentTypeAlias][not(umbracoNaviHide = 1)]"> <xsl:sort select="@createDate" order="descending" /> <xsl:if test="position() <= $itemsToDisplay"> <header> <div class="title"> <h2><xsl:value-of select="postTitle" /></h2> <p><xsl:value-of select="shortDescription" /></p> </div> </header> <a class="image featured" href="{umbraco.library:NiceUrl(@id)}"> <xsl:variable name="sm" select="umbraco.library:GetMedia(postImage, 0)" /> <xsl:variable name="dt" select="umbraco.library:JsonToXml($sm/umbracoFile)" /> <img src="/imageGen.ashx?image={$dt/src}" /></a> <p><xsl:value-of select="postContent" /></p> <footer> <ul class="actions"> <li> <a class="button large" href="{umbraco.library:NiceUrl(@id)}">Continue Reading</a> </li> </ul> </footer> </xsl:if> </xsl:for-each> </article> </xsl:template>
Anyone? Minor code changes made above. Thx
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to have a Next/Previous page
I have some XSLT code which displays 10 records/nodes and limiting them to 10. When a user creates more than 10 nodes/pages, how could I set the page up so when they click Next it goes to the next 10 listing and clicking Previous goes back? Thanks
Hi J
Show your code, please.
Alex
Hello Alex, see below
Anyone? Minor code changes made above. Thx
is working on a reply...