Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • njean Friend
    #127609

    In the readme I read this:

    <blockquote>
    Specific banner image for each menu item

    Header images are stored in templates/ja_mageia/images/header/
    You can copy your own images into here and declare images in template/ja_mageia/index.php . In this file, you have this line:

    $ja_header_images = array (‘header1.jpg’, ‘header2.jpg’);
    </blockquote>

    That isn’t very clear to me. How do I specify I want, let’s say, header1.jpg for main menu entry # 1?

    Sherlock Friend
    #245714

    Hi njean !
    You can view following code section for detail :


    //define image array for wide screen and narrow screen at bout line 15
    $ja_header_images_wide = array ('header1.jpg','header2.jpg','header3.jpg','header4.jpg','header5.jpg');
    $ja_header_images_narrow = array ('header1-n.jpg','header2-n.jpg','header3-n.jpg','header4-n.jpg','header5-n.jpg');

    //get current menu id at about line 34
    $curidx = $tempTools->getCurrentMenuIndex(); // view getCurrentMenuIndex function in ja_templatetools.php file.

    //get header image following current menu id at about line 36
    $ja_header_img = 'header.jpg';
    $ja_header_images = ($JAconfig->ja_width=='narrow')? $ja_header_images_narrow:$ja_header_images_wide;

    if (count($ja_header_images)) {
    $curidx = $curidx % count($ja_header_images);
    $ja_header_img = $ja_header_images[$curidx];
    }

    // set header image for background header
    <div id="ja-header" style="background: url(templates/<?php echo $JAconfig->template."/images/header/". $JAconfig->ja_color ."/". $ja_header_img;?>) no-repeat top right;">


    good luck

    njean Friend
    #245774

    Thanks but I still don’t understand.

    Let’s say I have the main menu with an article link in it.

    Article ID is 44 and menu itemID is 68. How do I assign that page a specific header image?

    njean Friend
    #245776

    No wait maybe I understand how it’s working…

    I’ve got a menu:

    – Link1
    – Link2
    – Link3

    First entry goes with header1, second with header2 and so on, right?

    Now, what if I have this kind of menu:

    – Link1
    – Link2
    —– Sublink 1
    —– Sublink 2
    – Link 3

    How to assign a specific image to SUblink 1&2? Now they both show header2

    Sherlock Friend
    #245967

    Hi njean !
    getCurrentMenuIndex() is function get current id with menu level is 1 so sublink1 and sublink2 both show header2 .
    I think that for assign a sprcific image to menu ( parent menu sub menu or all level ) . easy way is using banner module then assign specific module for a menu.

    sskarli Friend
    #246935

    Does it matter if one use Joomla 1.5 og 1.0? I use 1.0. Will it still work?

    emendabo Friend
    #247958

    Iam using joomla 1.0.15 and iam not quite sure how i should modify my template to get the required result?

    thx in advane

    phiber0ptik Friend
    #252888

    yeah – what about 1.0x ? what to do here ?

    mfcphil Friend
    #252899

    You could simply make a copy of your template have different image in your header files then assign the copied template to the required pages.

    nigelmaine Friend
    #271192

    <em>@hainn84 49375 wrote:</em><blockquote>Hi njean !
    getCurrentMenuIndex() is function get current id with menu level is 1 so sublink1 and sublink2 both show header2 .
    I think that for assign a sprcific image to menu ( parent menu sub menu or all level ) . easy way is using banner module then assign specific module for a menu.</blockquote>
    Hi Hainn84

    Could you be a bit clearer about what needs to be done to get header images to display in sub menus please. I don’t understand about <blockquote>getCurrentMenuIndex() is function get current id with menu level is 1 so sublink1 and sublink2 both show header2 </blockquote>.

    I hope you can help as I have looked at every Forum post on headers.

    Thanks in advance,

    Nigel

    Stavros Xenides Friend
    #358980

    Hi,

    Did anyone manage to resolve this issue rather than using BANNERS module?

    Like using getCurrentMenuIndex() or some sort of a similar API and customizing the index.php accordingly, so that sub-menus will be personalized with their header too?

    Rgds,
    Ali.

    Stavros Xenides Friend
    #358988

    <em>@cybele 198507 wrote:</em><blockquote>Hi,

    Did anyone manage to resolve this issue rather than using BANNERS module?

    Like using getCurrentMenuIndex() or some sort of a similar API and customizing the index.php accordingly, so that sub-menus will be personalized with their header too?

    Rgds,
    Ali.</blockquote>

    Me again.

    I think the best way (at least all worked for me), is using: http://extensions.joomla.org/extensions/photos-a-images/images-rotators/8514
    FlexHeader3.

    Rgds,
    Ali.

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

This topic contains 12 replies, has 8 voices, and was last updated by  Stavros Xenides 14 years, 1 month ago.

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