Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • emerich Friend
    #146374

    Hello guys,
    i search all forum and i know where i can change the menu colors for other menu items, but where can i change the menu color for a HOME – frontpage?
    Thanks for answer

    Anonymous Moderator
    #325358

    Hi emerich

    Please open templatesja_teline_iiilibsja.template.helper.php file, find following code section:


    function getThemeForSection () {
    //get the most parent menu id
    $query = "select params from #__modules where `module`='mod_janews2'";
    $database =& JFactory::getDBO();
    $database->setQuery($query);
    $params = new JParameter($database->loadResult());
    $sections = $params->get('sections', '');
    if (!$sections) return '';

    global $Itemid;
    $mid = $Itemid;
    $pid = $mid;
    $menu = &JSite::getMenu();

    if(!$menu) return;
    while ($pid) {
    $mid = $pid;
    $pmenu = $menu->getItem($mid);
    $pid = $pmenu?$pmenu->parent:0;
    }
    //Get menu item
    $menuitem = $menu->getItem($mid);
    //parse link
    $urls = parse_url($menuitem->link);
    $querystring = $urls['query'];
    $output = null;
    parse_str ($querystring,$output);
    $sectionid = 0;
    if($output['view']=='section'){
    $sectionid = $output['id'];
    }
    else if($output['view']=='category'){
    $catid = $output['id'];
    $sectionid = $this->getSectionId($catid);
    }

    if($sectionid) {
    $sectionids = preg_split('/[n,]|<br />/', $sections);
    for ($i = 0; $i < count($sectionids); $i++) {
    $temp = split(':',$sectionids[$i]);
    if(isset($temp[0]) && $temp[0]==$sectionid) {
    return isset($temp[1])? '-'.trim($temp[1]):'';
    }
    }
    }
    return '';
    }

    find this text: return ” and change to return ‘-your_color’

    example: your_color = red

    concatne Friend
    #327471

    Thank you! But i not change ok. Ple help i change color defau is red. Thank very much.

    Samir Mastaliyev Friend
    #327499

    Dear JA Developer
    i also didn’t get that. i’ve changed the things as you show, but nothing changed. may be i’ve done something wrong. please , clarify (see attachment, which menu i’m going to change ,green to black)


    1. Untitled-1
    Anonymous Moderator
    #327583

    Hi mastaliyev

    My code is only for the frontpage.

    For your image, you have to edit ja news 2 module, in Section IDs, you have to add a color for each Section ID. For full information, please check http://www.joomlart.com/forums/topic/ja-news-ii-modules-installation-guide/

    Samir Mastaliyev Friend
    #327587

    thank you,found that!

    emerich Friend
    #328228

    thanks for answer, its working…

    MERINEO

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

This topic contains 7 replies, has 4 voices, and was last updated by  emerich 14 years, 10 months ago.

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