I always customize themes with a subtheme and upon creating a subtheme with tweme I received the following notices:

  • Notice: Undefined variable: has_sidebar_second in include() (line 58 of /home/grumble/public_html/insite/sites/all/themes/tweme/templates/page.tpl.php).
  • Notice: Undefined variable: content_cols in include() (line 55 of /home/grumble/public_html/insite/sites/all/themes/tweme/templates/page.tpl.php).
  • Notice: Undefined variable: has_sidebar_first in include() (line 47 of /home/grumble/public_html/insite/sites/all/themes/tweme/templates/page.tpl.php).
  • Notice: Undefined variable: has_header in include() (line 34 of /home/grumble/public_html/insite/sites/all/themes/tweme/templates/page.tpl.php).
  • Notice: Undefined index: hidden in include() (line 9 of /home/grumble/public_html/insite/sites/all/themes/tweme/templates/page.tpl.php).

Which seem to be the root of an issue with blocks not showing though correctly specified at admin/structure/block.

I don't have a chance to troubleshoot/patch this right this second, but I just wanted to post it in the meantime.

Will submit patches as soon as I get a chance.

I was about to create a drupal bootstrap based theme myself-- so thanks for doing it!

CommentFileSizeAuthor
#4 tweme_sub.zip16.64 KBneRok
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

WorldFallz’s picture

I've tried wrapping them with isset(), but I'm still not getting any sidebars to print-- or any regions for that matter. Not sure what else to look at.

iaminawe’s picture

I am also not getting any of the main theme regions to print. In addition when I move blocks around in my subtheme, their position is not saved on the admin screen either which I am using the same subtheme on.

Please can you provide an example of a sub theme that works correctly with Tweme, Great theme by the way, definitely the best to the twitter bootstrap modules I have looked into so far. Thank you.

iaminawe’s picture

Please provide some guidance for this - I will turn it into documentation for the theme when I get it working
Is there something specific one needs to do with the subtheme to get the regions working correctly?

neRok’s picture

Status: Active » Fixed
FileSize
16.64 KB

I made a subtheme as per normal, and whilst I dont have any blocks, I also do not have any errors. Subtheme attached that you can just unzip into sites/all/themes

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

anydigital’s picture

Many thanks neRok for the assistance!

Please let me know if you have any further questions related to subtheming.

I'm going to create standalone subtheme based on Tweme and also publish it on Drupal.org.

msimanga’s picture

I created a sub theme of my own and the side blocks would not show. I also tried out neRok's sub_theme in post #4 and still no side bars. Anyone have a solution?

msimanga’s picture

Status: Closed (fixed) » Active

I had a look at the template.php file in the tweme folder and found that this is the issue:

function _tweme_is_tweme() {
  global $theme;
  return $theme == 'tweme';
}

I tried to override this function in my sub theme but this did not seem to work. So in the end I modified the tweme's template.php file. Not the most elegant solution

function _tweme_is_tweme() {
  global $theme;
  return $theme == 'sub_theme';
}
anydigital’s picture

No. you shouldn't change _tweme_is_tweme() function.

Just change one line in your subtheme's page.tpl.php.

From:

      <?php if ($has_sidebar_first): ?>
        ...
      <?php endif ?>

To:

      <?php if ($page['sidebar_first'] || $page['sidebar_first_affix']): ?>
        ...
      <?php endif ?>
anydigital’s picture

I also get rid of _tweme_is_tweme() :-)

Just use the latest dev version of Tweme. Your subtheme will work even without any changes mentioned above.

anydigital’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.