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.
I am using Profiler Builder with features and node export to create an installation profile that other's can use to easily get started with their sites. By default, on install there are only a few blocks that are placed in their respective regions. I would like for all of my blocks to show up when installing my site, so that the user doesn't have to enable them in admin/structure/block. If I have a block that was generated by a View, how might I enable this on defualt. Would it just be something like this? Thanks for the help.
array(
'module' => 'views',
'delta' => 'views-block',
'theme' => $default_theme,
'status' => 1,
'weight' => 0,
'region' => 'content',
'pages' => '',
'cache' => -1,
),
Comments
Comment #1
btopro CreditAttribution: btopro commentedThis is an area where you should use Features. Create a feature and the Context module to position blocks accordingly, or you can use https://drupal.org/project/features_extra for its block exportability support. While what you wrote is correct it'll be easier for you to manage via a Feature. This is an area (like content and roles) where it is recommended to make a Feature instead of needing to replicate a lot of Feature functionality in the code of the install profile.
Will accept patches to bring block support into the install routine (would be nice to integrate w/ ctools exportables some how to avoid need for Features) but Features is still easiest route at this time.
Comment #1.0
btopro CreditAttribution: btopro commentedTypo
Comment #2
btopro CreditAttribution: btopro commentedclosing out; reopen if the above didn't work out for you