Pdopage ajax pagination load by button multiple

I have multiple pdopage calls on one page. Unfortunately the function “ajax load by button” does not work. If I have loaded everything in one call, then the rest of the “load more buttons” are also disabled.

Here is my snippet-call:

<div id="[[+kategorie]]pdopage">
    [[!+[[+kategorie]]_[[+kategorie]]page.nav]]
    <div class="[[+kategorie]]_rows">
        [[!pdoPage?          
    &ajaxMode=`button`
    &tpl=`tplEvents`
	&limit=`5`
	&parents=`9`
	&includeContent=`1`
	&includeTVs=`eventDate,topEvent,eventLink,eventBild,kategorie,tags`
	&processTVs=`1`
	&tvFilters=`kategorie==[[+kategorie]]`
	&sortby=`eventDate`
	&sortdir=`DESC`
	&tvPrefix=``
	&hideContainers=`1`
	&tplWrapper=`tplEventWrapper`
	&ajaxElemRows=`#[[+kategorie]]pdopage .[[+kategorie]]_rows`
	&ajaxTplMore=`@INLINE <button class="btn btn-default btn-more [[+kategorie]]-more">mehr</button>`
	&ajaxElemMore=`#[[+kategorie]]pdopage .[[+kategorie]]-more`
	&pageNavVar=`[[+kategorie]]page.nav`
	&ajaxElemWrapper=`#[[+kategorie]]pdopage`
	&ajaxElemPagination=`#[[+kategorie]]pdopage .pagination`
	&ajaxElemLink=`#[[+kategorie]]pdopage .pagination a`
&totalVar=`[[+kategorie]]page.total`
	&plPrefix=`[[+kategorie]]_`
        ]]
    </div>
</div>
[[+[[+kategorie]]page.total]]

What’s the problem?

In the HTML markup of your page, do all the more-buttons have the same class?
There should be a <script> tag in the markup with a call to pdoPage.initialize({...}). What are the values of “more” and “moreTpl”?

Maybe you have to expand the JS code to make it work with multiple pdopage calls.

I think the problem is, that you have to use different values for the property pageVarKey.

Try adding it to the pdoPage call and check if it works now.

[[!pdoPage?
	...
	&pageVarKey=`page[[+kategorie]]`
]]

Great! Tank you! That’s the solution!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.