nxc_powercontent: create and update content from code and from REST
This page is for developers who create or change content from scripts or through REST. nxc_powercontent ("NXC
Powercontent", originally by NXC) extends how code creates, updates and removes content:
- download files from external resources when creating or updating objects;
- give HTML for
ezxmltextattributes; - set or change locations (main and additional);
- a built-in debug function, convenient in command line scripts;
- no new version is created when an object is updated.
In the Exponential 6 period it was extended for the REST extension ezprestapi, where it provided the
create and delete calls of REST API v2 (1.1.0, October 2024). Since ezprestapi 1.2.9 the REST API no longer uses
it: create, update and delete are written by the kernel's expContentWriter (Exponential 6.0.15), and ezprestapi
no longer requires this extension. nxc_powercontent stays an optional extension for code that uses it directly; see
REST API v1 and v2.
New code does not need it: the kernel's expContentWriter creates, updates and removes content from plain values (rich text as HTML, files from public addresses) and publishes every update as a new version, so the history is kept. How to find out whether an installation still uses this extension, how to remove it and how to move code over: Upgrade notes: the REST writes through the kernel, nxc_powercontent no longer needed.
List content classes in a template: class_list
Since 1.3.0 (12 July 2026) the content fetch function class_list lists content classes without custom PHP. It
filters by group, sorts by name and pages, mirroring the admin class list:
def $classes = fetch('content', 'class_list', hash('as_object', false(), 'sorts', true()))
foreach $classes as $class
$class.name
/foreach| Parameter | Meaning |
|---|---|
as_object | Return objects or plain arrays |
group_list | Restrict to class groups |
sorts | Sort by name |
limit | Number of classes |
Use it for admin dashboards, custom navigation or API responses.
Admin: Copy selected, Hide and Unhide selected
The extension overrides the kernel's content/action view with its own modules/content/action.php (the module
content of the extension). That copy lacked the handlers for CopyButton and HideButton/UnhideButton, so in the
admin3 sub-items More actions menu, Copy selected and Hide/Unhide selected fell through to "Unknown content
object action" and failed silently.
Since 1.2.0 (21 June 2026) both handlers exist:
- Copy checks
canCreate, collects class, section and node metadata for the browse restrictions, and shows the destination selector. - Hide/Unhide checks
can_hide, skips nodes already in the target state, and goes back to the parent view.
See Subitems "More actions" menu.
Other changes
| Version | Date | Change |
|---|---|---|
| 1.1.0 and later | December 2025 | PHP 8.5 nullable type fix. |
| 1.4.0 | 22 September 2026 | Module views safe on a persistent worker (Velocity). |
| 1.4.1 | Copyright notices name 1998 - 2026 7x & Exponential Foundation first. | |
| 1.4.2 | 2 October 2026 | The PDF export no longer stops with a fatal error: the content cache info is read from an object instance, as PHP 8 requires. See PDF export. |
| 1.4.3 | content/edit declares its redirect helper only once, so a persistent PHP worker can run it more than once. |
Related pages
- ezprestapi and REST API v1 and v2
- Content from plain values: expContentWriter and Writing content from PHP with expContentWriter
- Copy selected sub-items
- Velocity engines
- Chronicle and release notes
- Change ledger
- Behaviour changes of the extensions
- Months: 2024-10, 2025-12, 2026-06, 2026-07, 2026-09, 2026-10 (all extensions)
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.