I'm using getPage / getResources to show only the blog posts of a specific user. I use the &where property to only show posts with a certain ID for 'createdby'. This correctly returns only the posts from the specified user. So all this is working, except for the paging. The paging gives me 4 pages, even if there is only one post. It is like the [[!+page.nav]] placeholder doesn't know the where filter that has been applied. The second, third and fourth page are empty though.
Because my code has become kind of complicated I've included it all. Maybe the nesting/caching could be the problem.
I could only get this to work by calling everything uncached (the If snippet, getPage snippet, userID placeholder and page.nav placeholder.
[[!getUserID? &name=`auteur`]] <!-- sets placeholder 'userID' if author is provided. This works -->
[[!If? &subject=`[[+userID]]` &operator=`notempty` &then=`
<ul class="nonVisualList newsItems">
<!-- the correct posts are shown, only from specified user -->
[[!getPage? &element=`getResources` &parents=`[[*id]]` &where=`{"createdby:=":[[!+userID]]}` &tpl=`nieuwsRowTplTemp`
&showHidden=`1`]]
</ul>
<!-- page nav is wrong! based on total nr of resources instead of filtered nr -->
<div class="paging"><ul class="pageList">[[!+page.nav]]</ul></div>
` &else=`
<!-- this works and is not the problem -->
<ul class="nonVisualList newsItems">
[[!+articles]]
</ul>
[[!+paging]]
`]]
Why would the paging not respect the where filter? Thanks for any help!