MODx Get page


Page pagination with MODx Revolution.

To get some documentation for something really simple in MODx seems a little arkward, there is some great documentation on how to do some really advanced blog type stuff but if your new to Revolution and just want to do some basic stuff like output a bunch of child pages with automatic pagination here something simple that will do the job in this case showing 10 pages at a time and a tpl called showroom, I will post the tpl below but note the template variable name which needs to be assigned to the template and the syntax for it in the template itself.

I will update what I have done as I improve this but at the time of writing this its all to basic to use for a live site this is more for my reference.

Below is the call to go on the parent page


  [ [!+page.nav] ]


[ [!getPage?] ]
         &parents=`[ [*id] ]`
         &depth=`3`
         &tpl=`showroom`
         &sortby=`pagetitle`
         &tvPrefix=``
         &includeTVs=`1`
         &processTV=`1`
         &showHidden=`true`
         &limit=`2`
         &pageVarKey=`page`
         &element=`getResources`
         &elementClass=`modSnippet`
         &sortdir=`ASC`
      ] ]

  [ [!+page.nav] ]

TPL Chunk below this

<h2></h2>

<p>
- <a class="readmore" href="" title="">More Information ..</a>
</p>
<hr /><h2></h2>
<img src="" alt="Show Room" />
<p>
- <a class="readmore" href="[~]" title="">More Information ..</a>
</p>
<hr />

Next Link Previous Post

Bookmarks

Next Link Next Post

Scuba Diving


Add a Comment