Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How can we change the main background header image dynamically? (bkg_header.jpg)
 
pezomatic
Sr. Member
 
Avatar
Total Posts:  190
Joined:  2008-11-05
 

We have modified the “bkg_header.jpg” file so it spans the full width of a 1920 x 1080 display. Now we would like to make the image dynamic so it changes based on the product category that our customer is viewing. Does anyone know of a way to do this or a Magento extension that can do this?

We know that we can make a separate theme for each category and only change the header image. We have tried this and it works. The problem with this solution is that everything on the page reloads every time a new theme loads...which is really a terrible user experience and not a viable option for us.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lyonscg
Sr. Member
 
Avatar
Total Posts:  173
Joined:  2009-11-13
Chicago IL
 

I’m not sure where bkg_header.jpg is used. Where on the category is it?

Normally for these sorts of things (assuming you can’t do it through the admin panel), I normally create a <style> tag in the header with the css for the background. Then using PHP, you can manipulate it however you want.

If you can share the site you are working on, I can give you more specific instructions

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top