xRS MODX extra

xRS Search & pdoPage (scroll ajax mode)

Logo ResourceSpace Logo Wordpress Logo Prestashop Logo Joomla

Search results and Ajax automatic paging

xRS snippet can be used with the pdoPage snippet included in pdoTools extra for MODX.

All ajax display modes are available and it is possible to select the number of photos per page.

This demo use the pdoPage 'scroll' mode to automatically add images on page scrolling.

Note: first call could be slow because image files and data are not yet cached.

Scroll ajax mode Example

Query is send to photoarchives.jpdn.net to search photos with the IPTC keyword 'Japan'.

<div id="pdopage" style="min-height:500px;">
    <span class="badge badge-secondary float-right">Total: [[+xrs.total]]</span>
    <div class="rows row">
        [[!pdoPage?
            &element=`xrs`
            &ajaxMode=`scroll`
            &limit=`4`
                &action=`search`
                &search=`japan`
                &tpl=`tpl.rsextra.single_1`
                &extend=`1`
                &pOptions=`w=100&h=100`
        ]]
    </div>
    <div class="d-flex justify-content-between">
        [[!+page.nav]]
    </div>
</div>

Result

Total: 2001
Image ID: 395
Image ID: 392
Image ID: 444
Image ID: 445