<![CDATA[ Next/previous resource? - My Forums]]> https://forums.modx.com/thread/?thread=102324 <![CDATA[Next/previous resource?]]> https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551375
I'm looking at a way to pull the previous/next resource aswell as the page title. I've tried to use BasicNav but it doesn't pull the pagetitle, it's for a news page where you'll be able to go to the previous/next news article.

Thanks!]]>
vjazziee Jun 01, 2017, 08:27 AM https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551375
<![CDATA[Re: Next/previous resource?]]> https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551396 vjazziee Jun 01, 2017, 12:32 PM https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551396 <![CDATA[Re: Next/previous resource?]]> https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551394
<nav>
		<ul>
			[[!siblingNav? &showHidden=`1` &nextTpl=`siblingNavNextTpl` &prevTpl=`siblingNavPrevTpl`]]
			[[+sn.prev]][[+sn.next]]
		</ul>
</nav>


Create a chunk siblingNavNextTpl called and place this inside of it:

<li>
	[[+_isactive:is=`1`:then=`<a href="[[~[[+id]]]]">[[+pagetitle]]</a>`:else=`Try the other way.`]]
</li>


Another chunk called siblingNavPrevTpl with this

<li>
	[[+_isactive:is=`1`:then=`<a href="[[~[[+id]]]]">[[+pagetitle]]</a>`:else=`Try the other way.`]]	
</li>
]]>
lkfranklin Jun 01, 2017, 12:26 PM https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551394
<![CDATA[Re: Next/previous resource? (Best Answer)]]> https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551393 https://docs.modx.pro/en/components/pdotools/snippets/pdoneighbors]]> wintertribe Jun 01, 2017, 12:12 PM https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551393 <![CDATA[Re: Next/previous resource?]]> https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551392 Quote from: lkfranklin at Jun 01, 2017, 11:02 AM
You should be able to stick

[[+pagetitle]]


into your chunk

It doesn't seem to be working, I've tried [[+pagetitle]] as well as [[+sn.pagetitle]].

It currently looks like this:

<div class="col-md-12">
[[!siblingNav]]
[[+sn.prev]][[+sn.next]][[+sn.pagetitle]]
</div>

Thanks mate.]]>
vjazziee Jun 01, 2017, 12:11 PM https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551392
<![CDATA[Re: Next/previous resource?]]> https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551390
[[+pagetitle]]


into your chunk]]>
lkfranklin Jun 01, 2017, 11:02 AM https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551390
<![CDATA[Re: Next/previous resource?]]> https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551389 Quote from: lkfranklin at Jun 01, 2017, 10:10 AM
Have a look at siblingNav
https://docs.modx.com/extras/revo/siblingnav

I've tried that but it doesn't let me pull the pagetitle, it just gives me arrows.]]>
vjazziee Jun 01, 2017, 10:51 AM https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551389
<![CDATA[Re: Next/previous resource?]]> https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551378 https://docs.modx.com/extras/revo/siblingnav]]> lkfranklin Jun 01, 2017, 10:10 AM https://forums.modx.com/thread/102324/next-previous-resource#dis-post-551378