Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • alwayzfun Friend
    #176519

    I am using Joomla 2.5.4 and VM2 2.0.6 with the Puresite template and 2 languages. First, SH404SEF did not work so I gave up on that and went to the default SEF built into the Joomla and VM2. Works great so far…

    Can someone help with how the change the Puresite template to support going to selected language homepage when clicking on the main logo (same logo for both languages). Currently it goes to the same default language only (English).

    pavit Moderator
    #450394

    Hi

    Help me to understand, you want this

    1) Home page english – click on logo and redirect to the other language Home

    2) Home page in other language – click on logo and redirect in the English Home

    Correct ?

    alwayzfun Friend
    #450453

    When I go to the site, the default language is English. As I go around the site, if I click on the site logo on the upper left corner, it goes back to the English home page. This is correct.

    When I go to the site and select German as the language, the page turns to German as it should…but when I click on the site logo (same as above, the page turns back to English. I can go around the site in German, but from anywhere on the site, if I click on the logo, it goes back to the English homepage…but it should go to the German homepage as I’ve selected German as my language.

    pavit Moderator
    #450461

    Please send me via PM your super user account to the backend i will check this situation

    pavit Moderator
    #450495

    Hi

    Please look at this thread

    the difference with this is that you need to make this change not in index.php but in this file
    pluginssystemjat3jat3base-themesdefaultblocksheader.php

    Let me know if this solve your issue

    alwayzfun Friend
    #450502

    I found that thread also and was going to included in my original post…but it’s using a different method to make the link. I am not familar with how to change this statement in the header.php file…can you help:

    <h1 class="logo">
    <a href="<?php JURI::base(true) ?>" title="<?php echo $siteName; ?>">
    <img src="<?php echo 'templates/'.T3_ACTIVE_TEMPLATE.'/images/logo-trans.png' ?>" alt="<?php echo $siteName; ?>" />
    </a>
    </h1>

    The above is the part I think that needs to be changed…the other thread is referring to an /index.php which is in this case JURI::base(true)

    Thanks

    pavit Moderator
    #450507

    <blockquote>I am not familar with how to change this statement in the header.php file…can you help:</blockquote>

    Just change the actual line of code in the header.php with the one you showed above make your changes and test

    Take first a backup of the header.php file

    alwayzfun Friend
    #450515

    The code above returns a ‘ / ‘ as the output…but the actual required output for the German homepage as I can see is ‘ /index.php/de/ ‘

    This was my question was what other method to get to ‘ /index.php/de/ ‘ (I assume the ‘de’ would change depending on the language).

    alwayzfun Friend
    #450522

    Here’s the solution I’ve gone with as it seems to work. I found it going through the Joomla forum and applied it to this template…If there is a better/more elegant solution, please let me know…

    Added this before the logo class:

    $language = JFactory::getLanguage();
    $params = JComponentHelper::getParams("com_languages");
    if ( $language->getTag() == $params->get("site", "en-GB") ) {
    $tmp->url = JURI::base();
    } else {
    $lang_code_partials = explode("-", $language->getTag());
    $lang_prefix = array_shift($lang_code_partials);
    $tmp->url = JURI::base()."index.php/".$lang_prefix;
    }

    to add the ‘de’ to the end of the base URL if it’s not English…

    then changed the ..

    <a href="<?php JURI::base(true) ?>

    to

    <a href="<?php echo $tmp->url; ?>

    in the two locations in the template….(logo/text)

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 2 voices, and was last updated by  alwayzfun 12 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum