Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • debulle Friend
    #135656

    I would like the header images to be changed only when clicked on the main menu. When using other menu’s, like the user menu or another menu which I place on a different module location, I would not like the header images to change. Is there any way to link the header changes to one menu only?

    Sherlock Friend
    #281242

    Hi idebulle !
    There is a solution for you :
    – You go to admin >> extensions >> module manager –> filter top position and select JA Newsflash module, you set for it only displays on pages of mainmenu.
    – Create some banners module and set for it display on pages other menu.

    debulle Friend
    #281283

    Hi Hainn84
    Thanx for your reply, but this is not exactly what I mean. i would like to have the only the header background image to stick when the top menu has been selected. So for example, I’ve got top menu option 1,2,3,4 but when selecting menu option 2, also a submenu is displayed at the left position. If I now choose menu option 3 of this left menu, then also the top header changes to header nr. 3, which I don’t want. i want it to stay in header2 (I don’t think I am clear??)

    re
    deBulle

    Sherlock Friend
    #281342

    Hi debulle !
    I have understood your request , but it isn’t easy to control header background image in rochea template.
    Please Open index.php file in templates/ja_rochea folder , find following code section at about line 115 :


    <div id="ja-subhead" style="background: url(<?php echo $tmpTools->templateurl()."/images/headers/$ja_headerimg-bg1.jpg";?>) no-repeat bottom left;">

    this is code for put header background .

    Please open ja_vars.php file in templates/ja_rochea folder find following code section at about line 69 :


    //# Header background image
    $ja_header_type = 1; // 0: no header image; 1: header image for each menu item; 2: random header

    $ja_headerimg = "";
    if ($ja_header_type == 1) {
    $ja_headerimg = $ja_header_images [$tmpTools->getCurrentMenuIndex() % count($ja_header_images)];
    if (!is_file(dirname(__FILE__)."/images/headers/$ja_headerimg-bg1.jpg")) $ja_headerimg = $ja_header_images [0];
    }
    if ($ja_header_type == 2) {
    $ja_headerimg = $ja_header_images[rand (0, count($ja_header_images)-1)];
    if (!is_file(dirname(__FILE__)."/images/headers/$ja_headerimg-bg1.jpg")) $ja_headerimg = $ja_header_images [0];
    }

    this is code for switch header background. now , it is gotten follwing each menu item but base on itemid of that menu, you can view getCurrentMenuIndex function in ja_templatetools.php file.
    to switch header background following your request , you must hack to code of getCurrentMenuIndex function .

    debulle Friend
    #281395

    Hi Hainn48,
    thanx a lot for your perfect reply! this makes Forums like these a perfect workable place.

    I will spend the weekend to look into this, but you sure gave me a good sense of direction!
    Cheers from Holland!!

    deBulle

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

This topic contains 5 replies, has 2 voices, and was last updated by  debulle 15 years, 11 months ago.

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