-
- 67 Posts
Does anyone have ever had this issue?
You are using pdoNeighbors for a Prev/Next navigation.
You got only one resource inside a container.
So there is no previous nor next resource to go to.
But pdoNeighbors shows the Prev button anyway, meaning that the Prev button links to the same page you are visiting.
Which is the best way to simply hide the button if you only got 1 page and there are not 2+ resources to navigate through?
Haven't used it, but since pdoNeighbors can use the same parameters as pdoTools, maybe an output filter in a chunk to specify which tpl would work with totalVar placeholder?
[[[[+total:is=`1`:then=`$tplWithoutPrev`:else=`$tplWithPrev`]]]]
^^ untested ^^
Likely because "nothing" is... nothing. Make two chunks. One will have the markup for only one button, the other will have markup for two buttons.
-
- 142 Posts
What if write custom snippet which hides/strips pdoNeighbor if Parent has only one children?
Or use &resources parameter to call snippet to subtract all resources without siblings?
&resources=`[[snippetHere]]`
[ed. note: wintertribe last edited this post 8 years ago.]
-
- 67 Posts
Hi mtalvenheimo, thanks.
I am not good at php coding.
Any idea about how to write that?