Recent Topics

1 Oct 11, 2007 12:31    

My b2evolution Version: 1.10.x

Hi Everyone, I've scoured the forum for clues but I keep getting errors. This should be very simple but my php skills are hit and miss. I would like to use one skin but switch the sidebar content depending on the blog language or locale.

Something like this:

<?php
if( $lang == 'de-DE');
            {
      include ("sidebarA.php");     
            }
else
{  
      include ("sidebarB.php"); 
}
 ?>

I'll keep working on it. But if someone with better php coding skills could point me in the right direction, I'd be very grateful. Thanks in advance.

2 Oct 11, 2007 12:41

You should be able to use :

<?php
if( $Blog->get( 'locale' ) == 'de-DE' )
  include dirname(__FILE__).'/sidebarA.php';
else
  include dirname(__FILE__).'/sidebarB.php';
?>

¥

3 Oct 11, 2007 12:48

It works! Thanks, ¥åßßå for the lightening fast reply.


Form is loading...