PDA

View Full Version : Home Page Background



Cesar Lebron
September 26, 2012, 03:11 AM
Hi guys, how can I change the background only to the homepage. I want to have it different than the other pages. I know there is the: content_height but I want it only on the home page, any advice?

Mike
September 26, 2012, 04:26 AM
If content_height is the right place to use different background then you have to put condition and use different css styles



<div id="{if $pageInfo.Controller == 'home'}content_height_home{else}content_height{/if}"


and then in the style

Cesar Lebron
September 26, 2012, 05:08 AM
Hi Mike, you want me to replace this:

<div id="content_height">

{if $pageInfo.Key == 'home'}
{include file='header_home.tpl'}
{else}
{include file='header_main.tpl'}
{/if}

for this:

<div id="{if $pageInfo.Controller == 'home'}content_height_home{else}content_height{/if}" ???

Mike
September 26, 2012, 09:52 AM
I've looked into this again and i see that content_height is wrong place to edit background. Backgound applied for the body tag of page, and it seems to be not very simple to change.

I think easier solution for you is to copy templates/yourtemplate/css/common.css and make a copy for the home page.

So for home page load common_home.css and for other pages load common.css file

But it may be different for different templates, to change it and use as i said make following change to the header.tpl file
find


<link href="{$rlTplBase}css/common.css" type="text/css" rel="stylesheet" />

replace with


<link href="{$rlTplBase}css/common{if $pageInfo.Controller == 'home'}_home{/if}.css" type="text/css" rel="stylesheet" />

Be very careful, and always keep backups of original files in case you need to restore it.

If you can't sort it out on your own please submit a ticket.

Cesar Lebron
September 26, 2012, 01:56 PM
Hi Mike, thanks, it works fine!!!

Mike
September 27, 2012, 04:25 AM
You are welcome Cesar :)

Vitalii Nikitchuk
May 13, 2016, 04:52 PM
Hello people!
How can implement?
Different background for different pages
Fore example:
Listings page - background #ccc;
My-profile page - background #fff;

Viktor
May 16, 2016, 03:50 AM
Hello Vitalii,

I can suggest you check class in body tag. For each page has individual class.
For home page body has class: home-page
on search page: search-page
check it through console or firebug.

Tin tun Naing
August 19, 2016, 04:02 AM
My site Upgraded version 4.5.1. After change style css and logo image, cannot change style front-end.

I remove header square-pattern.png and changed logo image, changed some css code for font, still not change.

WHY?

Best Regards,

http://www.house-myanmar.com/

Curtis
August 19, 2016, 07:35 AM
My site Upgraded version 4.5.1. After change style css and logo image, cannot change style front-end.

I remove header square-pattern.png and changed logo image, changed some css code for font, still not change.

WHY?

Best Regards,

http://www.house-myanmar.com/

Hi,
1. At first you need update cache in your browser, click to Ctrl+F5 and check it.
2. Also i see that your webserver use the CloudFlare-Nginx and it cached static content.
In this case you need wait when the static will be updated automatically later or try update it manually via hosting panel.

Tin tun Naing
August 20, 2016, 03:03 AM
Hi Curtis,

1. I removed browser cache.
2. I think not that CloudFlare because other websites have CF, can change style or files update anytime.

Best Regards,

Curtis
August 20, 2016, 07:11 AM
Hi Curtis,

1. I removed browser cache.
2. I think not that CloudFlare because other websites have CF, can change style or files update anytime.

Best Regards,

So, if your problen already exist that you can submit a ticket and our developer will check it.