Page 1 of 1

how to change header image?

Posted: Tue Aug 05, 2008 12:31 pm
by rajoo_sh
Hi,
I want different header images article/category wise, should I use multiple templates? or the banner component can be used? I've attached two dummy screen shots for your reference to explain what I actually want.

Please help
Regards

Re: how to change header image?

Posted: Tue Aug 05, 2008 12:50 pm
by richrc1131
Not sure if this is what you're looking for, but Ninjoomla.com has an extension that allows you to treat your logo position as a module position.

Re: how to change header image?

Posted: Tue Aug 05, 2008 3:31 pm
by Jim Simpson
I have the same problem. I can't change any images (background image) on the template. I went to the source file and saw nothing!

Re: how to change header image?

Posted: Wed Aug 06, 2008 1:37 am
by richrc1131
If you're not having trouble with changing the image in the logo position, you might be better served by starting a new thread for having trouble changing the background image otherwise possible solutions for the logo position problem might be jumbled together with yours.

Re: how to change header image?

Posted: Wed Aug 06, 2008 11:37 am
by rajoo_sh
Hi Rich,

Thank you so much for the reply, I'll try this module, I guess it will solve my problem (although its for 1.0).

I'll get back to you after using this.

Regards

Re: how to change header image?

Posted: Sat Aug 09, 2008 3:14 am
by keruchan
I dont know if this will help...
try making a new category or section ..name it "banners" assign the position where you wanted your banner/image be, then 'write new article" on that article just put in the image nothing else. edit the parameter to fit on that position, make the background transparent (if there no such parameter then make a class for CSS and do the edit there).... then assign it to banners category, edit its page assignment (like how you assign menus for every page) , select the page you wanted them to be.

lets say to make it short... the banner is not actually a banner... it is an article (with no article inside instead it was just an image.) and will only appear where you assign him to be, like how other article appears when you click certain menu.

sounds crazy .. :eek:

Re: how to change header image?

Posted: Mon Oct 20, 2008 7:18 pm
by danclarkson
Hi,

I'm also interested in being able to design a site using Joomla that allows a different main image near the tope of the page for each of the main sections.

Is there any easy way to achieve this or not ?

Thanks

Dan (very newbie)

Re: how to change header image?

Posted: Fri Oct 24, 2008 7:25 am
by Efedro
rajoo_sh wrote:I want different header images article/category wise, should I use multiple templates? or the banner component can be used?
You have to use some self-made script to show different logo in your design.

Re: how to change header image?

Posted: Fri Oct 24, 2008 12:08 pm
by danclarkson
OK , I take it you mean pop some php script in to work out from the url what categoty you are viewing and retrieve an image based on that ?

Re: how to change header image?

Posted: Fri Oct 24, 2008 4:44 pm
by keruchan
Just insert this kind of joomla php code

Code: Select all

<jdoc:include type="modules" name="bannerhead" style="raw" />
you can name it what ever you want. paste it on the div where you want your banner/header image to appear.

on the XML add a bannerhead on the position. or what ever name you wish. just make sure the name you indicated on the code is the same as the name you will add on the XML.

after doing that, log on the backend, go to banner under components. add a client and a category and then make a dummy banner. (you can not add a banner without atleast a client and category.) don't fill up the URL coz you are not using it as a banner, instead you will be using it as a header.

after doing so, go to module, add module , select Banner.
configure the banner , make sure you select the right position, for my example it is bannerhead, don't forget to select the category you wanted it to appear. in this way you can make different header in every category you wish.

select the only client and the category you made on the parameters.
then add a CSS suffix (don't forget this one coz this is important.) for example: _homeheader. then save.

now this is the trick.
go to your template.css
type down the CSS suffix for my example it is

Code: Select all

div .bannergroup_homeheader div{
visibility:hidden;
}
This will hide the the Div that contain the img src.

then replace it with background image.

Code: Select all

div .bannergroup_homehead{
	background-image:url(../images/home.png);
	background-position: top right;
	background-repeat:no-repeat;
	width: 505px;  (the width of your image)
	height: 256px; (common sense)
	padding-bottom: 2px; (common sense)
}

if you have 7 header then make a 7 banner module, just use the same client and category ... who cares if they have the same image, you will only hide the image using CSS and replace it ^^. just don't forget to add a suffix on the parameter of every banner module you make so that you have the control over them.

Re: how to change header image?

Posted: Tue Feb 17, 2009 8:28 pm
by EsorOne
keruchan, thx..

Your sulution works really good...

Thx again