We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Like almost all snippets, you can use chunks to create custom mini-templates (tpls) for its output. For example, the default tpl for a single row item is
    <li>
    <a href="[[~[[+id]]]]">[[+pagetitle]]</a>
    </li>


    http://rtfm.modx.com/extras/revo/siblingnav
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 46668
      • 51 Posts
      OH yes of course not sure what I was doing last night not to be getting the correct results. Managed to delete my first post due to a over sensitive pad on a laptop but for anyone wondering what this post is about I asked how to get the page title of the following page to show up next to the link.
      Now have everything working here's what I have in case this helps anyone else

      Siblingnav call
      [[!siblingNav? &sortBy =`{"publishedon":"ASC","id":"ASC"}` &showHidden=`1` &nextTpl=`snnextbutton` &prevTpl=`snprevbutton`]]


      snnextbutton chunk
      [[+_isactive:is=`1`:then=`
      	<a href="[[~[[+id]]]]">[[+pagetitle]]</a>  
      	`:else=`
      	<p>No more newer posts</p>
      	`]]	
      


      snprevbutton chunk
      [[+_isactive:is=`1`:then=`
      	<a href="[[~[[+id]]]]">[[+pagetitle]]</a>  
      	`:else=`
      	<P>No more older posts this is the oldest</p>
      	`]]	
      


      output in template using the following:

      <!-- start of styles for the next and previous links -->
      <div style="margin:auto;">
      
          <div style="float:left; width:50%;">
                 <div class="alert alert-info"><h3><img title="Next Link" src="files/icons/left_arrow_32x32.png" alt="Next Link" width="32" height="32" /> Previous Post</h3>
      <!--[[+sn.first]]-->[[+sn.prev]]<br /> </div><!-- End of alert div -->
          </div>
      
          <div style="float:right; width:50%;">
             <div class="alert alert-info"><h3><img title="Next Link" src="files/icons/right_arrow_32x32.png" alt="Next Link" width="32" height="32" /> Next Post</h3>
      [[+sn.next]]<br /><!-- [[+sn.last]] --></div><!-- End of alert div-->
      
          </div><!-- End of styles for the next and previous links -->
        • 10378
        • 375 Posts
        Here is how I did it with Resources from an Articles container:

                <div class="siblingnav row">
                    [[!siblingNav? &showHidden=`1` &limit=`1` &prevTpl=`olderNews` &nextTpl=`newerNews` &placeholderPrefix=`snparent.`]]
                    [[+snparent.next]][[+snparent.prev]]
                </div>


        The newerNews chunk:

        <div class="next-sibling columns six first">
        	[[+_isactive:is=`1`:then=`
        	<a href="[[~[[+id]]]]" title="<">[[+pagetitle]]</a>  
        	`:else=`
        
        	`]]
        </div>


        The olderNewsChunk:

        <div class="prev-sibling columns six last">
        	[[+_isactive:is=`1`:then=`
        	<a href="[[~[[+id]]]]" title=">">[[+pagetitle]]</a> 
        	`:else=`
        	
        	`]]
        </div>
          Freelancer @bitego http://www.bitego.com
          ---
          GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
          More infos here: http://www.bitego.com/extras/goodnews/