Out of the box, Responsive Blog is not subtheme-friendly. In part, page.tpl.php uses theme_get_setting(setting, 'responsive_blog') for all settings, which means the options must be set for the base theme instead of the subtheme.

I'm using a subtheme to get the benefits of a custom stylesheet. Please consider making this theme friendly to subthemes.

CommentFileSizeAuthor
#3 sub_theme_friendlier.diff17.99 KByettyn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rols’s picture

A possible workaround is to copy the theme settings into your subthemes .info file. Then copy theme-settings.php to your subtheme and rename the function to your_theme_name_function_form_system_theme_settings_alter(&$form, &$form_state)
and replace any instance of theme_get_setting('setting_name','responsive_blog') to theme_get_setting('setting_name','your_theme_name' in page.tpl.php e.t.c.

yettyn’s picture

Version: 7.x-1.4 » 7.x-1.6

I'm no expert on themeing but after looking at the code of a few themes I think there are 2 basic problems here. First of all I suspect it's a bad design decision to use theme_get_setting() at several places as in page.tpl.php where available variables could be used instead, $logo being one example.

Secondly, I suspect it's also a bad design decision to hard code the theme name as 2nd argument to theme_get_setting(), because if not given the current theme will automatically be used. So my take is it's there if in case for any reason the call needs to refer to a different theme than the current one in use.

Well that's my theory at least, so now time to test it in practice as I'd like to use this as a sub-theme as well in a multi-site environment, rather than fork my own copy of it - in case the author decides to give it more love. If my theory is correct I will post a patch.

The code above may work but is basically also a bad solution because it forces you to maintain code unnecessarily in case of updates to the base theme.

yettyn’s picture

Status: Active » Needs review
FileSize
17.99 KB

Here is a diff with the changes I have done to make the theme much more sub-theme friendlier, actually works more or less out of the box I think. Works fine with just a basic sub-theme.info and logo.png file and will also sense if sub-theme has own color-schemes.css, slideshow images, even < > images or a modified slide.js file. No need to put any of the tpl.php in the sub-theme, but it should work if you want to. But please test as I haven't do that much testing so there may be glitches.

I couldn't make any patch as I don't have git, but if anyone else like to make it into a patch feel welcome.

yettyn’s picture

Issue summary: View changes

Using HTML tags instead of BBCode.

authentictech’s picture

Issue summary: View changes

Thanks yettyn for providing the solution. I can confirm it works for me.

It would be nice if the theme maintainer could implement this fix, particularly as the work has already been done. It's been over a year now... Thanks.

authentictech’s picture

Category: Feature request » Bug report

Sub-theming is the Drupal way. This should work so changing the issue to a bug report.

sillygwailo’s picture

Version: 7.x-1.6 » 7.x-1.7

I can get behind this, though I'd want to include this after #3101081: Add "Use system setting" option for dark theme lands, which would mean some slight modifications to the patch here.