-
AuthorPosts
-
April 16, 2008 at 8:31 pm #127609
In the readme I read this:
<blockquote>
Specific banner image for each menu itemHeader 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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
April 17, 2008 at 1:46 am #245714Hi 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 luck1 user says Thank You to Sherlock for this useful post
April 17, 2008 at 12:35 pm #245774Thanks 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?
April 17, 2008 at 12:40 pm #245776No wait maybe I understand how it’s working…
I’ve got a menu:
– Link1
– Link2
– Link3First 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 3How to assign a specific image to SUblink 1&2? Now they both show header2
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
April 19, 2008 at 2:20 am #245967Hi 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.April 26, 2008 at 6:59 pm #246935Does it matter if one use Joomla 1.5 og 1.0? I use 1.0. Will it still work?
May 6, 2008 at 3:22 pm #247958Iam 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 Friendphiber0ptik
- Join date:
- May 2007
- Posts:
- 9
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
June 10, 2008 at 12:54 pm #252888yeah – what about 1.0x ? what to do here ?
mfcphil Friendmfcphil
- Join date:
- September 2007
- Posts:
- 2866
- Downloads:
- 3
- Uploads:
- 218
- Thanks:
- 211
- Thanked:
- 388 times in 133 posts
June 10, 2008 at 1:52 pm #252899You 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 Friendnigelmaine
- Join date:
- September 2008
- Posts:
- 71
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 18, 2008 at 6:14 pm #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 Hainn84Could 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 FriendStavros Xenides
- Join date:
- September 2014
- Posts:
- 12
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
October 14, 2010 at 12:45 pm #358980Hi,
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 FriendStavros Xenides
- Join date:
- September 2014
- Posts:
- 12
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
October 14, 2010 at 2:12 pm #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. -
AuthorPosts
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