S
S
sl4m_mc2018-08-21 11:00:25
MODX
sl4m_mc, 2018-08-21 11:00:25

How to properly use pdoPage callback functions?

There is a page with the output of goods using mFilter2.
For pagination, pdoPage is used there.
I can't catch the ajax loading event of pagination pages.
The following code throws an error in the console (pdoPage is not defined):

pdoPage.callbacks['before'] = function(config) {
    console.log('Конфиг перед загрузкой!', config);
};
pdoPage.callbacks['after'] = function(config, response) {
    console.log('Конфиг после загрузки!', config);
    console.log('Ответ от сервера!', response);
}

This code is written in the official documentation of the pdoPage snippet. Can you tell me
how to get rid of this error so that the code works?
Tested on this page.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question