Link to home
Start Free TrialLog in
Avatar of sara_bellum
sara_bellumFlag for United States of America

asked on

Change banner / header image on joomla 3.1 template home page

I have installed Joomla_3.1.1 on my server and need to change the banner (header) image on the page, which is now using the protostar template.

I have uploaded my sample/custom banner, which appears in the media library and at
http://mysite.com/images/banners/sample_banner.jpg

The documentation shows various ways to use the joomla GUI to change media / images, but none of them work - on reload, the default index.php page for any selected template remains unchanged. I also joined the forum but cannot post any questions to it - that feature is blocked, and the only search results that appear provide links to modules available for download.

My joomla default home page source shows the path to the default banner is at
http://mysite.com/images/headers/maple.jpg.  But I can't find the page:
joomla/doc/root/templates/protostar/index.php does not contain the string '/images/headers/maple.jpg', so I can't connect the source code to the document tree.
From the joomla doc root, I also tried  
$ find . -type f |xargs grep -l '/images/headers/maple.jpg'  
with no results.  How joomla determines the path to template images is a mystery - I found nothing in the css files either to answer this question.

What file(s) do I need to change to get a template index.php page to point to my custom banner? Joomla installation includes links to sample site templates from my default home page, but the docs do not show how to edit a template for personal use.
Avatar of TvMpt
TvMpt
Flag of Portugal image

Hi.
Are you sure that the page are not cached?

You only have to go Administrator panel, template manager and edit style. In the right side you have a form that says logo and there you could select the banner from gallery.

Use firebug to check that is pointing to the new image.

example:
http://www.youtube.com/watch?v=xtOEwNuwJQE
Avatar of Peter Hart
this link tells you how to change the logo in protostar template
http://www.inmotionhosting.com/support/edu/joomla-3/protostar/logo

and more details...

http://www.inmotionhosting.com/support/edu/joomla-3/protostar

as TvMpt mentioned you may have caching on which means it will take up to 15 mins for the change to show up on the live site
Avatar of sara_bellum

ASKER

Thanks for your feedback!  The earlier versions of Joomla have more documentation but probably don't apply due to changes in the GUI. The 3.0 guidance chilternPC sent should work but doesn't.

From the Admin panel, I selected Extensions -> Template Manager -> Options  
The menu on the Options page is long:
Component, Banners, Cache Manager, Checkin, Contacts, Articles, Smart Search,
Installation Manager, Joomla! Update, Language Manager, Media Manager,
Menus Manager, Messaging, Module Manager, Newsfeeds, Plugins Manager, Redirect, Search, Templates, Tags, Template Manager, Users Manager, Weblinks

but nothing here prompts me to replace an existing logo/banner/header image - the Logo entry that inmotionhosting.com points to is not there.
I checked Banners, and a pull-down menu asks me to select a Purchase Type (monthly, yearly, weekly). I have no idea what that means.
I checked Media Manager, which is used to set image paths and file extensions, that's all.

I don't believe that caching is a problem but will try to find those settings.
ASKER CERTIFIED SOLUTION
Avatar of Peter Hart
Peter Hart
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks very much, I found the Details-Options-Menu Assignment tabs and was able to insert an image, which is great but the image is simply prepended to the template - it doesn't replace the default banner in use (maple.jpg).

I tried saving the logo setting and my menu selections to a new template style (protostar_change), and then setting this style as the new default, but I see no change on page reload: the old image and menus remain unchanged, and there's no opportunity to add custom menu items not listed under the 'Menus assignment' tab.

Finally, I tried finding a file or string matching 'protostar_change' in the joomla doc root on the server, nothing was returned. But when I refresh the Admin page, the new style is still there with my selections so all is not lost. Let me know how to fix this thanks.
its very hard trying to debug a joomla template with features I've never used, through an exchange of text..
the template you purchased must of come with some support.
and the company will probably online support - I would use them as first point of call.

what do you mean 'prepended' the logo?  infront or on top?
can you give the url of the website?  (use www.shorturl.com/)
not having user this template its hard to imagine what is going on,
but don't forget the company you bought it off have been selling successfully so there are no problems with it. I would reset it all back and start again now you know there the settings are and follow the docs that came with the tempalte
The short answer is that you cannot replace an image in a site template with another image because you cannot edit a site template.

What you can do is create your own site template. That requires you to know a great deal about how joomla templates work - if you copy the files from the desired template over to  a new directory (making sure that all the files within it point to the right places), the new template will appear in your Admin page and you can choose it as your new default, but that accomplishes nothing because you will have the same template as before.

Editing template files is tricky. For example, there are three css files used by the protostar template, and the primary one is 6459 lines long. I replaced it with a bare-bones css file, but joomla does not recognize it as a valid stylesheet so the template  can't be applied as a default.

This promises to be a very iterative process. I'll try to document what I can as I move forward.
I will learn more later, but I found a short-term hack to resolve the issue. It is in fact easier to edit a template than to make a copy of it so pls disregard my previous comment.

Although nothing in the template files points to the image I am trying to replace, I did find the image, under joomla-doc-root/images/headers/maple.jpg.  I moved this image to a tmp directory (you need server privileges), renamed my image maple.jpg and uploaded it to the /images/headers directory.

To remove existing content from the page, you can find the article headers under Article Manager and disable "Featured", that should remove them from the page. Similarly, you can use the Menu Manager to unpublish menus or menu items. I was able to add a menu but the format looks strange, another problem for another day.

To restore the original template, reverse the above. This is not a good solution if you need to switch back and forth between the original template and the one you are building, but it does answer my question.
My solution applies, but thanks for the feedback!