Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Civette on
Hi guys,
I searched around in documentation and haven't found a clue so far : Is there a way to create sample content upon theme install ?
I managed to create a content type itself and a custom block too but I would like to add, when installing the theme, a sample content of each to demonstrate what it looks like once theme installed. Up to the end user to modify or delete it.
Thx
Comments
Drush and Devel
You can do this with Drush and Devel. Install and enable:
Generate 50 nodes of random content type
drush devel-generate:content
Generate 20 nodes of content type "Song"
drush devel-generate:content --bundles=song 20
Thx for feedback but this is
Thx for feedback but this is not really the purpose. Idea is to have a single content created upon theme install to provide visual guidance to final user.... kind of a placeholder text. Adding an additional module would be overkill.