<![CDATA[ getPage, not showing results - My Forums]]> https://forums.modx.com/thread/?thread=103137 <![CDATA[getPage, not showing results]]> https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555096
Situation:

I'm using the Collections addon for my Blog. On my homepage I show the 7 most recent resources. I've created a total of 8.

I intend to use getPage to add pagination.
So with getPage installed, I used the following snippet call inside my home template:

[[!getPage? &element=`getResources` &parents=`2` &limit=`2` &showHidden=`1`]]
                  <ul class="pagination pagination-sm">[[!+page.nav]]</ul>


Result:

I get 4 page results while it should have shown 2! Anyway, then when I click on page 2 of 4, the URL nicely shows:
domain.com/index.php?id=2&page=2


but I get the same page in return, which is page one basically :S

What am I missing?

Thanks,
John]]>
kenjiro Nov 11, 2017, 08:10 PM https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555096
<![CDATA[Re: getPage, not showing results]]> https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555107 Quote from: Bruno17 at Nov 12, 2017, 04:03 PM
you replace just this:
...

with something like this:

[[!getPage?
    &element=`getResources`
    &parents=`[[*id]]`
    &tpl=`blogit.blog_row_tpl`
    &limit=`7`
    &includeTVs=`1`
    &processTVs=`1`
    &tvPrefix=``
    &where=`[[!TaggerGetResourcesWhere]]`
    &showHidden=`1`
]]


you need &includeTVs=`1` and maybe &processTVs=`1` to get TVs showing

That did the job! Thanks for helping out Bruno.

This did it!
&element=`getResources`

]]>
kenjiro Nov 12, 2017, 08:31 PM https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555107
<![CDATA[Re: getPage, not showing results (Best Answer)]]> https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555105
[[!getResources?
    &parents=`[[*id]]`
    &tpl=`blogit.blog_row_tpl`
    &includeTVs=`1`
    &processTVs=`1`
    &tvPrefix=``
    &where=`[[!TaggerGetResourcesWhere]]`
        &showHidden=`1`
        &limit=`0`
]]


with something like this:

[[!getPage?
    &element=`getResources`
    &parents=`[[*id]]`
    &tpl=`blogit.blog_row_tpl`
    &limit=`7`
    &includeTVs=`1`
    &processTVs=`1`
    &tvPrefix=``
    &where=`[[!TaggerGetResourcesWhere]]`
    &showHidden=`1`
]]


you need &includeTVs=`1` and maybe &processTVs=`1` to get TVs showing]]>
Bruno17 Nov 12, 2017, 04:03 PM https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555105
<![CDATA[Re: getPage, not showing results]]> https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555104 Quote from: Bruno17 at Nov 12, 2017, 11:30 AM
usually, you replace getResources with getPage.
It seems, you have just added getPage(without a tpl) and have still getResources in use?

Hi Bruno, according to the manual:
This Snippet does nothing by itself, but rather depends on another Snippet to return the output for a specified page (or range of data within a complete set). For example, the getResources, getFeed, and Archivist Snippets can both be wrapped by getPage.

So if the manual @ https://docs.modx.com/extras/revo/getpage is correct, something else is either not configured correctly, or I have found a bug?

[EDIT]
One problem after another. I've got paging working now, but now the images from the resources are not showing up. I can go on for days troubleshooting, with an online manual, that was written from an expert's point of view. It's hard to make much sense out of it.

This is what I now have in the main navigation menu of my overview site template:
<ul class="pagination pagination-sm">[[!+page.nav]]</ul>


In the content section of the same site template:
[[!getPage? &elementClass=`modSnippet` &element=`getResources` &parents=`2` &depth=`2` &limit=`7` &tpl=`my_blogPost_container_tpl` ]]

]]>
kenjiro Nov 12, 2017, 12:39 PM https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555104
<![CDATA[Re: getPage, not showing results]]> https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555103 It seems, you have just added getPage(without a tpl) and have still getResources in use?]]> Bruno17 Nov 12, 2017, 11:30 AM https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555103 <![CDATA[Re: getPage, not showing results]]> https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555097
[[!getPage? .... ` &limit=`2` ...]]


Should be 7:

[[!getPage? .... ` &limit=`7` ...]]


That solved the page result issue. But I still have the problem of not getting to the next page result.

Extra troubeshoot info:
This value has no impact on the amount of resources displayed.
In admin > Extras > Collection Views --> General Settings:

Page size = 7

.

The blogit.get_posts chunk:
[[blogit.lexicon_load]]
[[!getResources?
	&parents=`[[*id]]`
	&tpl=`blogit.blog_row_tpl`
	&includeTVs=`1`
	&processTVs=`1`
	&tvPrefix=``
	&where=`[[!TaggerGetResourcesWhere]]`
        &showHidden=`1`
        &limit=`0`
]]


Altering the &limit value is respected. But getPage can not overrule the limit by decrease or increase.]]>
kenjiro Nov 11, 2017, 08:23 PM https://forums.modx.com/thread/103137/getpage-not-showing-results#dis-post-555097