Copied to clipboard

Flag this post as spam?

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

  • J 263 posts 426 karma points
    Nov 14, 2018 @ 16:27

    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

  • Alex Skrypnyk 5209 posts 18990 karma points MVP 2x admin c-trib
    Nov 20, 2018 @ 13:50
    Alex Skrypnyk

    Hi J

    Show your code, please.


  • J 263 posts 426 karma points
    Nov 20, 2018 @ 21:24

    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() &lt;= $itemsToDisplay">
            <div class="title">
                      <h2><xsl:value-of select="postTitle" /></h2>  
                <p><xsl:value-of select="shortDescription" /></p>
                <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>
                                        <ul class="actions">
                                            <a class="button large" href="{umbraco.library:NiceUrl(@id)}">Continue Reading</a>
  • J 263 posts 426 karma points
    Dec 05, 2018 @ 12:43

    Anyone? Minor code changes made above. Thx

Please Sign in or register to post replies

Write your reply to: