The plg_content_export plugin is a content-driven utility for Joomla 4/5 designed to allow users (or administrators) to export article data directly from the frontend of the website.

Unlike the Privacy plugin (which is for GDPR compliance), this content plugin is built for data portability and sharing, allowing you to turn an article into a downloadable file format.


What this Plugin Does

Content plugins in Joomla typically trigger when an article is being rendered (the onContentPrepare event).

  1. Button Injection: It detects if the "Export" functionality is enabled for a specific category or article and injects a button (often near the Print/Email icons) into the article view.

  2. Data Extraction: When a user clicks the export button, the plugin gathers the article's title, body text, author, and metadata.

  3. Format Conversion: It converts that raw HTML/Database data into a structured format. Looking at common implementations in your testcom repo, this is likely:

    • JSON: For machine readability.

    • CSV/XML: For spreadsheet or external system imports.

  4. Download Trigger: Instead of displaying a new page, it forces the browser to download a file (e.g., article-title.json).

Getty Images

How to Use the Plugin

1. Installation & Activation

  • Zip the src/plugins/content/export directory.

  • Install via System > Manage > Extensions.

  • Go to System > Manage > Plugins and enable "Content - Export".

2. Configuration

In the plugin settings, you can usually define:

  • Target Formats: Choose which formats to offer (JSON, XML, etc.).

  • Access Levels: Restrict the export button to specific User Groups (e.g., only "Registered" or "Author" can export).

  • Category Filter: Choose to only show the export button on specific categories (e.g., "Reports" or "Documentation").

3. Frontend Usage

  1. Navigate to an article on your website.

  2. Look for the Export button/link (usually at the top or bottom of the article text).

  3. Click the link, and your browser will immediately download the article data.