How to list resources published in particular month of the year and also else than this, between two particular dates?

Hi can anyone guide me the way to list resources ( Products in my case ) published in one particular month of the year or between two particular dates ? I see, it would be somewhere near by sortby / sortByTV or publishedon properties but am unable to achieve the results … below is my current getPage Call.

                        &pagePrevTpl=`<li class="pagination-prev"><a href="[[+href]]"><span class="zn_icon" data-zniconfam="glyphicons_halflingsregular" data-zn_icon=""></span></a></li>`
                        &pageNextTpl=`<li class="pagination-next"><a href="[[+href]]"><span class="zn_icon" data-zniconfam="glyphicons_halflingsregular" data-zn_icon=""></span></a></li>`
                        &pageActiveTpl=`<li class="active" class="page-[[+pageNo]]"><span style="display: inline-block;">[[+pageNo]]</span></li>`
                        &pageNavTpl=`<li><a href="[[+href]]"><span>[[+pageNo]]</span></a></li>`

Also, pagination is not working in the above last call.


This older Thread should help you out.

In regards to your pagination, do you call it below the getPage call with something like this?

   <div class='paging'>
      <ul class='pageList'>

Also if your shop has a significant amount of products to list, I would suggest switching to pdoPage and pdoResources (both part of the pdoTools Extra) which have much better performance and use almost the same syntax. I just switched to pdoTools in my Shop as well an noticed a clear improvement in the loading time of my products.

Hi, I tried following property in getPage call to get items between two particular dates but super confused …

&where=`{"publishedon:>":1385769600}` - Working
&where=`{"publishedon:>":1385769600, "AND:publishedon:>":1401494400}` - Working
&where=`{"publishedon:>":1385769600, "AND:publishedon:<":1401494400}` - Failed

The problem is coming from ‘<’ in the last statement.

It seems like modx cosiders ‘<’ in a different manner, may be as start of html tag but I am not sure, but because of this, I am not able to make it work. Anyone has any update ?


Syntax looks fine to me, are you sure you have resources that were published between those times? Or are you getting errors in the MODX log?

The listing issue is resolved … dont know but hard refreshing two to three times resolved the issue. @markh thanks for your reply.

1 Like


Pagination also got resolved. Thanks guys for your help !!


1 Like