Hi,

i just installed blocktheme and it works as expected. However, I do work with the zen_basic theme (zengine) - and for blocks that are themed through blocktheme the $edit_links variable seems to be not available.

Any ideas how to get it back?

Thanks
Markus

CommentFileSizeAuthor
#2 template.php_.txt6.96 KBmarkusH

Comments

JacobSingh’s picture

Hi Markus,

I'm not sure why that would be... Except that if you override zen_block, and don't include that logic, they're not going to get populated. I don't have time to specifically look into it for you, but if you include your template.php file, I could take a look.

Best,
Jacob

markusH’s picture

StatusFileSize
new6.96 KB

Hi Jacob,

thanks for the reply. In the meantime I fiddled around a bit with the stuff and after some trail-and-error I found this to work for me:

/*
 * Blocks
 */
 
function zen_basic_block($block) {
if (module_exists('blocktheme')) {
  if ( $custom_theme = blocktheme_get_theme($block) ) {
    return _phptemplate_callback('block',array('block' => $block),array($custom_theme) ); /* <-- changed the callback */
  }
}

return phptemplate_block($block);
}

This makes use of the phptemplate/zengine build in feature for pluggable template files (e.g. page-node-xx.tpl.php etc.). And the variables are there as I need them.

Changing back to the original line from the README:

    return _phptemplate_callback($custom_theme,array('block' => $block));

just wouldn't work for the variables. Don't know enough about the engines to say why. I attached the _new_ template.php file for reference.

Thanks
Markus

JacobSingh’s picture

Status: Active » Closed (won't fix)

Cool! Glad that worked, sorry I couldn't be of more assistance.