The D6 block admin_configure form seems to be oblivious to themes. I'm running a multi-site setup which shares several blocks from views that need to be put in different regions based on their theme. So, this patch offers the theme name as a new argument on the block configuration page. Settings can now be unique per theme. Also, after the admin_configure form is submitted, it returns to the main block_list page for that theme - not back to the default block_list page, as with current D6 code.

Please comment on the patch and see if it can be included with future versions of the block module. thanks!

Comments

izmeez’s picture

This may be exactly what I need. I'll have to learn about testing patches to core.

Izzy

manuel garcia’s picture

Version: 6.12 » 7.x-dev
Category: bug » feature
Status: Active » Closed (works as designed)

As far as I know, the block configuration is independent for each theme. Meaning you can already setup different blocks in different regions per theme. This is default beahviour.

So If I am understanding your problem correctly, this functionality is already there.

izmeez’s picture

Sorry, I have no experience with D7. I am using the current version of D6.

Yes, the current D6 behaviour does allow the blocks to be configured for each theme, however, when changes are made to the block configuration for a theme other than the default theme and the submit button is clicked the display reverts back to the default theme and does not stay on the theme that is currently being configured.

I think this does not occur when blocks are being arranged in different regions but when blocks are being individually configured.

Furthermore, and may be this should be a separate issue, when different themes are being used and blocks are enabled, the settings of the blocks are not used by the new theme right away. It is necessary to click configure and save each block just to have the settings take effect, such as title to use for the block.

Hope that helps provide some clarity and I hope this is the right place to add these comments.

Izzy

manuel garcia’s picture

Version: 7.x-dev » 6.x-dev
Category: feature » bug
Status: Closed (works as designed) » Needs review

I see what you mean imeez. I've set the version to 7.x-dev because feature requests only go to the dev version of 7, d6 is only bug fixes.

However, I'm not sure wether this should be considered a bug, nor have the necessary php skills to check your patch. Just trying to help here :)

Let's do this, I'll set it to 6.x-dev, as a bug report and as needs review so it gets attention. We'll see what happens.

Greetings

osman’s picture

I have the same problem. I have a 2 themes website. I need to set the same blocks in different regions with different visibility options and different titles. Since the contents are the same or dynamically generated by Views, Menu Block, etc. creating new blocks wouldn't make sense.

Plus, the core block.module should have been capable of managing blocks separately for each theme already. After a little research I found there are already some open issues.

Jeff, thank you for supplying the patch. When I compared your solution against other similar solutions, your approach seemed more clean and direct actually.

I updated your patch against Drupal core 6.x-dev (2012-Feb-29), and made minor changes and I am attaching here for review.

With the attached patch,

  • The configure links for each block (admin/build/block) is appended the theme key, whether only one theme is enabled or multiple themes. i.e. the "Navigation" block's configure URL becomes admin/build/block/configure/user/1/garland for the Garland theme.
  • Each block configuration becomes theme specific. Visibility, Pages and Title options became secured. (Currently those options are changed for all the available theme blocks when edited in block configuration page.)

Hopefully this patch will be helpful.

Cheers,

Osman

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.