GovCMS Content Provisioning
CivicTheme comes with pre-set Block Content blocks configuration. Since Drupal does not support running install hooks in themes, a custom content provisioning script has to be used.
When to provision content
Content provisioning is needed in two scenarios:
During initial setup - When first installing CivicTheme
After deployment - When deploying to production environments
Provisioning workflow
The provisioning needs to be run twice:
Locally - to capture created configuration for config entities (blocks, menus etc.)
In production - to populate the configuration with the default content
Step-by-step instructions
1. Local provisioning
Login to the local instance of your site.
Navigate to
/admin/appearance/settings/<SUBTHEME_MACHINE_NAME>
Press "Provision content" button.
Navigate to the homepage and observe that all blocks and menus are present.
Export config for created entities:
ahoy drush cex -y
Commit and push to remote.
2. Production provisioning
Wait for deployment to finish and login to the Drupal instance.
Navigate to
/admin/appearance/settings/<SUBTHEME_MACHINE_NAME>
.Press "Provision content" button.
Navigate to the homepage and observe that all blocks and menus are present.
What gets provisioned
The content provisioning creates:
Block Content blocks - Pre-configured content blocks for common page elements
Menu items - Default menu structure
Configuration entities - Required configuration for the theme to function properly
Avoiding content forklift
If you want to avoid doing a full content migration (forklift) from local to production:
Use the
-n
flag when running the automated installation scriptProvision content locally first
Export the configuration
Deploy configuration to production
Provision content in production
Troubleshooting
Content not appearing after provisioning
Ensure caches are cleared:
ahoy drush cr
Check that the correct theme is set as default
Verify that all required modules are enabled
Provisioning button not available
Ensure you're logged in as an administrator
Check that the theme is properly installed and enabled
Clear caches and try again
Configuration export issues
Make sure you have the correct permissions to export configuration
Ensure that config imports are enabled (check with your GovCMS support ticket)
Related documentation
Last updated
Was this helpful?