Hi,

I am using different themes for my different sections. I just want each logo to link to section's home instead of website's homepage.

I mean, under example.com/section1, the logo has to be linked to example.com/section1 and bot to example.com

Is it possible?

Thanks...

Comments

Sinan Erdem’s picture

Status: Active » Fixed

I just solved my problem.

I added this function in my theme's template.php file:

function themename_preprocess(&$variables, $hook) {
        if ((arg(0) == 'section1')) {
        $variables['front_page'] = '/section1';
        }
        elseif ((arg(0) == 'section2')) { 
        $variables['front_page'] = '/section2';
        }
        elseif ((arg(0) == 'section3')) { 
        $variables['front_page'] = '/section3';
        }
}

If you are gonna use this code, dont forget to change the "themename" part to your actual theme name. Also note that for aliased paths, you may have to use the trick explained on this page: http://drupal.org/node/838508

Status: Fixed » Closed (fixed)

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