tpl.PageBreaker.ajax
Последнее обновление Aug 17th, 2026 | История страницы | Улучшить эту страницу | Сообщить о проблеме
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moreОписание¶
Этот чанк используется только если включён параметр pb_ajax плагина PageBreaker.
Он обрабатывает клики по ссылкам с классом load_page и отправляет ajax-запрос на текущую страницу. После ответа плагина старый блок текста заменяется новым.
Укажите id элемента на странице, куда выводится контент.
<script type='text/javascript'>
var elem = '#content'; // HTML element on webpage in which will be loaded new block of text
$(document).ready(function () {
$('.load_page').live('click', function () {
var href = $(this).attr('href');
$.post(href, {
'action': 'PageBreakLoad'
}, function (data) {
$(elem).html(data);
})
return false;
})
})
</script>
Плейсхолдеры¶
В этом чанке нет необычных плейсхолдеров.
См. также¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










