OnWebPagePrerender
Последнее обновление Oct 14th, 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Событие: OnWebPagePrerender¶
Срабатывает после того, как ресурс разобран, но до того, как он отрисован.
Заголовки типа содержимого еще не отправлены, а выходные данные не очищены.
- Служба: 5 - Template Service Events
- Group: System
Параметры события¶
Нет.
Пример¶
Отфильтруйте слова из вывода перед его отображением:
$words = array("snippet", "template"); // words to filter
$output = &$modx->resource->_output; // get a reference to the output
$output = str_replace($words,"<b>[filtered]</b>",$output);
Статические плагины и относительные пути. Если плагин — статический элемент и включает или подключает файлы по относительным путям, он выполняется не из исходного файла, а из кэшированной копии — например core/cache/includes/elements/modplugin/7.include.cache.php. См. Bug 11129.
Смотри также¶
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










