Hi all.
Firstly im a very beginner at Drupal and especially programming in Drupal, secondly i do not know if this is a bug (I read in some thread that this problem is by design), and thirdly pardon my english - this is not my native language.
We have a Drupal 6 website, which uses the context module. In some contexts we have blocks which should not be rendered in specify languages.
Of course i started with a google search and found this thread (http://drupal.org/node/657710) describing the same "bug". The problem here got solved by installing context_respect module and patching this. I tried to install context_respect but i could not get the patch to work. Since context is working fine in all other aspects, we decided not to use context_respect but simply change context to respect the block language settings.
What i did, and this is where my question really begins, is i added the follwing lines to build_block($block, $reset = false) in context_reaction_block.inc:
global $language;
$block_lang = db_result(db_query("SELECT language FROM {i18n_blocks} WHERE module = '%s' AND delta = '%s'", $block->module, $block->delta));
if(!empty($block_lang) && $block_lang != $language->language){
$block->content = '';
}
For now, this works on our site, but i dont really know if this is the right way to go with it? I mean, setting $block->content to an empty string, seems a little wrong?
And does anyone know if theres a better solution?
Any thoughts or ideas would be most welcome :-)
Best Regards, Kristian Kaa
Comments
Comment #0.0
kaa4ever commentedRemoved a comment
Comment #1
paulocsHi,
Still having problems with context 7.x or 8.x. If yes, please reopen the issue.
I will close the issue as context 6.x is no longer supported.
Thanks.
Comment #2
paulocsComment #3
paulocs