I'm using 4.7 and have some blocks set to appear only on the front page. This works great until I add the i18n module (cvs) - then the detection of the frontpage breaks down entirely - blocks that should appear there don't, and those that shouldn't do.

The strange thing is that the phptemplate.engine seems to detect the frontpage just fine -
I'm using this code in page.tpl.php:

if ($is_front) {/* check if it's the front page */
include 'page-front.tpl.php'; /*load a custom front-page.tpl.php */
return; }

and it loads up the correct template for the homepage.

I've tried using the PHP return TRUE option in blocks testing for $is_front to be TRUE, but that doesn't work either.

Has anyone else run into this problem?

Comments

njehlen’s picture

After trying a bunch of different scenarios, it seems like block page detection isn't working at all with the i18n module installed. Blocks that are set to show up on all pages except X are showing up on every page including X, and ones that are set to show up only on X never show up at all.

Any ideas?

njehlen’s picture

solved by adding */ before page chooser in blocks settings - en/[PAGE] or fa/[PAGE] for example. using */[PAGE] will activate/deactivate the block for every [PAGE], regardless of language. For front page, use */node (assuming "node" is selected as the front page in General Settings.

michaelangela’s picture

I had just hit this problem and could not find the solution. Many thanks. Doing initial testing on it now but it seems to be working so far.

--------------------
Michael
http://michaelangela.name

njehlen’s picture

All credit goes to Jose A Reyero - who is the person behind the i18n module, and who figured this out and answered it in another post. Thanks Jose!