I want to put 'previous' and 'next' buttons on the sub-category pages, so if you're on the sub-category2 page you'll get a previous link taking to you sub-category1 and a next link taking you to sub-category3, for example. If on sub-category3 you only get a back button.
The next link seems to be working fine (just showing node name, not link, for simplicity):
However, the previous link is causing some grief. It seems to always link to the first sibling (e.g. Sub-category1, even when I'm on the Sub-category3 page).
Preceding sibling
Hi,
I have the following structure:
- Home
- - Category1
- - - Sub-category1
- - - Sub-category2
- - - Sub-category3
- - Category2
- - - Sub-category4
- - - Sub-category5
I want to put 'previous' and 'next' buttons on the sub-category pages, so if you're on the sub-category2 page you'll get a previous link taking to you sub-category1 and a next link taking you to sub-category3, for example. If on sub-category3 you only get a back button.
The next link seems to be working fine (just showing node name, not link, for simplicity):
However, the previous link is causing some grief. It seems to always link to the first sibling (e.g. Sub-category1, even when I'm on the Sub-category3 page).
Can anyone see how to resolve this so it always retreives the sibling node immediately preceding the current page?
Thanks
That's not exactly what it does, it gets ALL of the preceding sibblings (see: http://pimpmyxslt.com/axesviz.aspx?contextNode=1073&axis=preceding-sibling#screen).
I think you could change it to this and it should work (select just the first one from the results):
Yep, that does it, thanks Sebastian. I thought I was gonna have to get all 'muenchian' for a moment there ;)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.