Quick Node Status Toggler
This module adds an easy-to-use, one-click toggle switch to the content administration page, allowing administrators to quickly publish or unpublish content without reloading the page. It automatically integrates with the default content view and uses modern JavaScript for a smooth experience.
Quick Node Status Toggler provides a modern, AJAX-powered toggle switch for the Drupal content administration page. It allows site administrators to publish or unpublish content with a single click without reloading the page, significantly speeding up content management workflows.
Features
- One-click publishing/unpublishing: Toggle node status directly from the main content administration list (/admin/content).
- AJAX-powered: No page reloads required; updates are instantaneous and visually confirmed.
- Visual Feedback: Includes a sleek, animated toggle button with clear color-coded states and labels.
- Automated Integration: The module automatically adds a "Quick Status Toggle" column to the default "Content" view upon installation.
- Secure: Respects Drupal core permissions (administer nodes) and implements robust CSRF protection for all AJAX operations.
- Modern & Lightweight: Built with Vanilla JavaScript and the Fetch API, ensuring compatibility with Drupal 10 and 11 without overhead from older libraries.
Post-Installation
The module is designed to be "plug-and-play."
- Installation: Enable the module as you would any other Drupal module.
- Automatic Setup: Upon installation, the module automatically updates the default "Content" view to include the toggle field.
- Usage: Navigate to Content (/admin/content). You will see the new toggle switches in the list. Simply click a toggle to instantly change the status of an article, page, or any other content type.
- Customization: If you use a custom view for content administration, you can manually add the "Quick Status Toggle" field to any node-based view via the Views UI.
Additional Requirements
This project depends only on Drupal Core. No additional contrib modules or external libraries are required.
Recommended modules/libraries
Views / Views UI (Core): While enabled by default in most installations, these are required to display the toggle switches in your administration lists.