I am wondering what the correct way to handle this is.

We have multiple sites each which have their own theme. When fe_blocks adds a block to a feature it seems to include the theme the block is placed in (which does make sense since this is how blocks are placed). But then, of course, when i enable this feature on one of our other sites; the block is not placed since that theme is not the theme for that site.

Would it not make more sense for the feature to simply store that the block is on the default theme and then enable it on site 2 on it's default theme?

Comments

liquidcms’s picture

Title: Can blocks be assigned to default theme rather than a specific theme » Blocks can't be imported unless using same theme.
Category: Support request » Bug report

As i think primary use of Features is to share functionality across sites (as opposed to just migrating config from dev to live); i'll change this to be a bug.

netw3rker’s picture

So, the problem with this is that blocks are stored in a somewhat theme specific way by nature. That means exporting the config of a block would have to be universally applied, which pretty much isn't possible. Consider that Theme A has a region "upper right", but Theme B does not. How would fe_block go about applying the exported configuration to that theme?

I guess you could argue that because block configuration is universal across all themes, and only region can be changed, then the configuration minus the theme regions could be exported, and the region values can be applied separately. This might make sense in your case. Feature A has custom settings minus region info for block system_main. Then Feature B says put system_main in the upper_right region - not directly caring about the custom configuration data.

Thoughts?

liquidcms’s picture

In my case i have 6 sites all with sub themes off the same base theme. All with the same regions. Blocks are basically busted in features since it captures blocks on a theme basis (as drupal does it). But the option of allowing a theme placeholder (like default_theme) in the feature would solve this.

Yes, many themes do not have common regions.. but often than not, in those cases, block migration wouldn't make much sense anyway.

circuscowboy’s picture

This is the case I am in as well. I am debating to call all the child themes by the same name so this functionality will work but it would also be great to have a solution like "default_theme".

liquidcms’s picture

Category: Bug report » Feature request