-
AuthorPosts
-
November 24, 2008 at 5:13 pm #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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
December 4, 2008 at 7:48 am #281242Hi 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.December 4, 2008 at 2:46 pm #281283Hi 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
deBulleSherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
December 5, 2008 at 4:27 am #281342Hi 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 .December 5, 2008 at 9:44 am #281395Hi 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
-
AuthorPosts
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