/redaxo-core:redaxo-extension-pointsfrom redaxo-core
Documents REDAXO's extension point hook system for modifying core/addon behavior without patching files. Covers registration, priority levels, and common EPs for frontend rendering, system lifecycle, and backend content.
Ships in redaxo-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Extension Points are REDAXO's hook system. Instead of patching core or another addon, you register a callback that fires at a defined moment.
Registration goes in your addon's boot.php:
<?php
// boot.php
rex_extension::register('OUTPUT_FILTER', function (rex_extension_point $ep) {
$content = $ep->getSubject();
// modify $content...
return $content;
});
The return value replaces the subject for downstream listeners. Returning null (or no return) keeps the subject unchanged.
rex_extension::register(
string $extensionPoint,
callable $callback,
int $level = rex_extension::NORMAL, // EARLY, NORMAL, LATE
array $params = [] // extra data the EP receives
);
Lower level values run first. Use EARLY to run before the default behavior, LATE for cleanup or final adjustments.
| EP | When | Subject | Use for |
|---|---|---|---|
OUTPUT_FILTER | After full HTML is built | full page HTML | minify, inject scripts, replace tokens |
GENERATE_FILTER | Before the article content cache file is written | generated article content (PHP code, not yet executed) | modify what gets persisted to the cache |
ART_CONTENT | After getArticle() / REX_ARTICLE[] rendered the article content (per ctype) | rendered article HTML | inject blocks, wrap content |
ART_INIT | Article object constructed, before the article is loaded | empty string – the object is in param article | configure the object, e.g. slice revision (a template set here is overwritten when the article loads) |
| EP | When | Use for |
|---|---|---|
PACKAGES_INCLUDED | After all addons booted | cross-addon setup that needs siblings loaded |
RESPONSE_SHUTDOWN | After response was sent | async cleanup, stats |
| EP | When | Use for |
|---|---|---|
STRUCTURE_CONTENT_HEADER | Backend article edit – above slices | warning banners, info |
SLICE_SHOW | Each slice whenever a slice list is rendered – backend editor (slice HTML) and frontend cache generation (module output as PHP code) | wrap slice output; for backend-only changes to the slice preview use SLICE_BE_PREVIEW |
MEDIA_IS_IN_USE | Before media deletion | prevent deletion if you reference it elsewhere |
CLANG_DELETED | A language was removed | clean up your clang-keyed data |
ART_DELETED / CAT_DELETED | An article/category is removed | clean up references |
PAGE_TITLE_SHOWN | Backend – right after the page header was rendered (subject is an empty string, return HTML) | notices or toolbars below the page title |
MEDIA_ADDED | A file was added to the media pool (params carry the media data) | post-process uploads, sync metadata |
The full list is documented at https://redaxo.org/doku/main/extension-points.
Inside the callback, the rex_extension_point instance carries:
$ep->getSubject() – the value passed in (often what you'll modify)$ep->getParam('key', $default) – extra context (article ID, user, etc.)$ep->setParam('key', $value) – pass info to later listeners$ep->getName() – the EP name (useful for shared callbacks)rex_extension::register('ART_CONTENT', function (rex_extension_point $ep) {
$article = $ep->getParam('article'); // rex_article_content
$articleId = $article->getArticleId();
$clang = $article->getClangId();
$html = $ep->getSubject();
if ($articleId === rex_article::getNotfoundArticleId()) {
return $html; // don't touch 404s
}
return '<div class="article-content">' . $html . '</div>';
});
Always guard backend-only logic:
rex_extension::register('PACKAGES_INCLUDED', function () {
if (!rex::isBackend()) {
return;
}
if (!rex::getUser() || !rex::getUser()->isAdmin()) {
return;
}
// …admin-only setup
});
Lets other addons hook into your code:
$result = rex_extension::registerPoint(new rex_extension_point(
'MY_ADDON_ITEM_SAVED',
$itemHtml, // subject
['item_id' => $id, 'user' => rex::getUser()] // params
));
Subscribers can transform $result and your code continues with their version.
if (rex::isFrontend()) that fires only on frontend). Register unconditionally in boot.php, then guard inside the callback.bool result of a helper call, or '') – only null (or no return) keeps the subject; any other value replaces it for downstream listeners and the caller.OUTPUT_FILTER for things that should be in the template – it runs on every uncached request and adds latency.PACKAGES_INCLUDED slows down every request. Cache results or move into a cronjob.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub friendsofredaxo/claude-marketplace --plugin redaxo-core11 skills in this plugin
/redaxo-addon-developmentBuilding and maintaining custom REDAXO addons – package.yml, boot.php, install/update/uninstall, lang files, fragments, backend pages, the assets pipeline (and the reinstall-to-sync rule), cache-busting on asset URLs, vendor dependencies, and the common-pitfalls checklist. Use when the user creates a new addon, edits package.yml, sets up backend pages, ships frontend assets from an addon, integrates Composer dependencies, or asks how to package functionality as a reusable addon./redaxo-api-functionsBuilding HTTP/AJAX endpoints in REDAXO using rex_api_function – the lib/ class location, naming convention, $published flag for frontend access, JSON responses, CORS for cross-domain widgets, and the rex-api-call URL. Use when the user adds an AJAX/HTTP endpoint to a custom addon, builds a JSON API for a frontend widget, or asks how to expose data via /index.php?rex-api-call=. Distinct from the FriendsOfRedaxo/api addon (covered by the redaxo-api-addon plugin)./redaxo-architectureREDAXO project structure, request lifecycle, and core classes. Use when the user works on a REDAXO codebase, mentions REDAXO directory layout, asks about rex_addon/rex_config/rex_path/rex_url/rex_clang/rex_request, or when files under redaxo/src/, redaxo/data/, or redaxo/cache/ appear in the conversation.Other plugins' skills for the same job