I have a snippet which gets data from a table I made using an xpdo model. What I would like to do is put this through getPage so I can paginate the data and template it out placing the different fields into chunk placeholders for each row. But I haven’t been able to find much information on getPage (nothing in the wiki), my understanding of it comes from getResources alone really.
I am guessing you would output an array somehow in the snippet?
Any help would be appreciated.
See if this helps:
http://modxcms.com/forums/index.php?topic=46346.0
Here’s an example:
[[!getPage?
&elementClass=`modSnippet`
&element=`YourSnippet`
&parents=`17`
&depth=`2`
&limit=`10`
&pageVarKey=`page`
&includeTVs=`1`
&includeContent=`1`
&tpl=`blogListPost`
]]
<div class="paging">
<ul class="pageList">
[[!+page.nav]]
</ul>
</div>
Thank you that was helpfull.
Also on a side note is there a correct way to get variables from urls in modx? Or is the php $_GET command the best way to do it?