Drafts & Revisions
InspireCMS provides a powerful content versioning system that allows you to work with drafts and track revisions of your content. This guide explains how to use these features to manage your content workflow effectively.
Content States Overview
In InspireCMS, content can exist in various states:
- Draft: Content that is being worked on but not yet published
- Published: Content that is live and visible to site visitors
- Unpublished: Previously published content that has been taken offline
- Scheduled: Content set to be published automatically at a future date
Working with Drafts
Creating a Draft
When you create new content in InspireCMS, it starts as a draft by default:
- Navigate to Content in the admin panel
- Click Create Content
- Add your content details, fields, and settings
- Click Save (not "Publish") to store as a draft
Drafts are visible only in the admin panel and not on your live site.
Identifying Drafts
Drafts are clearly marked in the content list:
- Status indicator shows "Draft"
- Often color-coded differently from published content
- Show an editing icon
Editing Drafts
You can freely modify drafts without affecting your live content:
- Find the draft in your content list
- Click to open it in the editor
- Make your changes
- Click Save to update the draft
Draft Preview
Preview your draft to see how it will look when published:
- Open the draft in the editor
- Click the Preview button in the editor toolbar
- Your draft will appear in a modal window showing how it will appear on the site
This preview is visible only to authenticated admin users.
Publishing Content
When your draft is ready to go live:
- Open the draft in the editor
- Review all content and settings
- Click the Publish button
- Confirm the publish action
Once published, the content becomes visible on your live site.
Scheduling Publication
For content that should go live at a specific time:
- Edit your content as usual
- In the publishing options, select Schedule
- Set the desired publish date and time
- Click Schedule
The system will automatically change the content status from "Scheduled" to "Published" at the specified time.
Content Revisions
InspireCMS automatically tracks revisions each time content is saved, creating a history of changes.
Viewing Revision History
To see the history of changes to a content item:
- Open the content item in the editor
- Look for the Content History tab/button
- View the list of all revisions with timestamps and authors
Content Locks
To prevent conflicts when multiple users edit the same content:
- When a user begins editing content, a lock is placed on that content
- Other users see an indicator that the content is being edited
- Locks remain active until explicitly released
- Only administrators and the user who placed the lock can unlock the content
Custom Publishing States
InspireCMS allows for custom publishing states to match your workflow:
use SolutionForest\InspireCms\Facades\ContentStatusManifest;
use SolutionForest\InspireCms\DataTypes\Manifest\ContentStatusOption;
use Filament\Actions\Action;
// In your service provider
public function boot()
{
ContentStatusManifest::addOption(
new ContentStatusOption(
value: 2,
name: 'review',
formAction: fn () => Action::make('review')
->label('Send for Review')
->action(function ($record, $action) {
if (is_null($record)) {
$action->cancel();
return;
}
if (! \SolutionForest\InspireCms\Helpers\ContentHelper::handlePublishableRecord($record, $publishableState, $livewire, [])) {
return;
}
$action->success();
})
)
);
}
Example Usage: Content Review and Approval System
For organizations that require approval before publishing:
- Content author creates and edits a draft
- Author submits the content for review
- Editors/approvers are notified of pending review
- Approvers can:
- Approve and publish
- Request changes (returns to draft)
- Reject the content
Adding a Custom Content Status
A basic approval workflow can be set up using custom states and notifications:
use SolutionForest\InspireCms\Facades\ContentStatusManifest;
use SolutionForest\InspireCms\DataTypes\Manifest\ContentStatusOption;
use Filament\Actions\Action;
// In your service provider
public function boot()
{
// Add "In Review" status
ContentStatusManifest::addOption(
new ContentStatusOption(
value: 2,
name: 'in_review',
formAction: fn () => Action::make('submit_for_review')
->authorize('inReview')
->successNotificationTitle('Send to Review')
->action(function ($record, $action) {
$if (is_null($record)) {
$action->cancel();
return;
}
$publishableState = 'in_review';
if (! \SolutionForest\InspireCms\Helpers\ContentHelper::handlePublishableRecord($record, $publishableState, $livewire, [])) {
return;
}
$action->success();
})
)
);
}
Conflict Resolution
When conflicting edits occur:
- The system detects when two users have edited the same content
- On save, the second user is shown a conflict resolution screen
- They can choose to:
- Merge changes manually
- Keep their version (overwrite)
- Discard their changes
- Save as a new draft
Best Practices
- Regular Saves: Save your work frequently to create revision points
- Meaningful Comments: Add descriptive comments when making significant changes
- Test Before Publishing: Always preview your content before publishing
- Schedule Major Updates: Use scheduling for significant changes to go live during off-peak hours
- Limit Draft Duration: Try not to keep drafts unpublished for extended periods to avoid outdated content
- Regular Cleanup: Periodically review and remove unnecessary drafts and revisions