Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,110 of 9,110 pages
About the help in other languages
All help pages

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 as PDF

Address: https://doc.exponential.earth/exphelp/viewer/features/6.0/extensions/nxc_powercontent.md

On this page

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 ezxmltext attributes;
  • 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}
ParameterMeaning
as_objectReturn objects or plain arrays
group_listRestrict to class groups
sortsSort by name
limitNumber 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

VersionDateChange
1.1.0 and laterDecember 2025PHP 8.5 nullable type fix.
1.4.022 September 2026Module views safe on a persistent worker (Velocity).
1.4.1Copyright notices name 1998 - 2026 7x & Exponential Foundation first.
1.4.22 October 2026The 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.3content/edit declares its redirect helper only once, so a persistent PHP worker can run it more than once.

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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x