--- if ($i == 1 && $i != $page && !empty($pageFirstTpl)) {
+++ if ($i == 1 && $i != $page && !empty($pageFirstTpl) && ($page - 1) > $pageLimit) {
--- if ($i == $pageCount && $i != $page && !empty($pageLastTpl)) {
+++ if ($i == $pageCount && $i != $page && !empty($pageLastTpl) && ($pageCount - $page) > $pageLimit) {
Can you post your getPage call?Сall -
[[!getPage@artpolitics?
&element=`getResources`
&tpl=`newsTpl`
&sortby=`id`
&dir=`DESC`
&includeContent=`1`
&includeTVs=`1`
&where=`[{"publishedon:>=":"[[!getDate? &offset=`2014-04-16`]]", "publishedon:<":"[[!getDate? &offset=`2014-04-19`]]"}]`
]]
cache No cache_expires false cache_handler false cache_key false elementClass modSnippet limit 5 namespace offset 0 page 0 pageActiveTpl <li[[+activeClasses]]><a[[+activeClasses:default=` class="active"`]][[+title]] href="[[+href]]">[[+pageNo]]</a></li> pageFirstTpl <li[[+classes]]><a[[+classes]][[+title]] href="[[+href]]">[[+pageNo]]</a></li><li><span>...</span></li> pageLastTpl <li><span>...</span></li><li class="control"><a[[+classes]][[+title]] href="[[+href]]">[[+pageNo]]</a></li> pageLimit 5 pageNavOuterTpl [[+first]][[+pages]][[+last]] pageNavScheme pageNavTpl <li[[+classes]]><a[[+classes]][[+title]] href="[[+href]]">[[+pageNo]]</a></li> pageNavVar page.nav pageNextTpl <li class="control"><a[[+classes]][[+title]] href="[[+href]]">>></a></li> pagePrevTpl <li class="control"><a[[+classes]][[+title]] href="[[+href]]"><<</a></li> pageVarKey page totalVar total
Just for testing purposes before we dive any deeper, what do you get when you omit &where property?It is all the same.
Is the limit respected?Yup, don't see any bad about it.
Can you also post your getDate snippet here?It is just "strtotime()" snippet.