Post by BYOLARIS4 » Wed Jan 15, 2020 2:23 am

hello, all is on the title, i'm trying to change the body background only on the homepage, tried all what i've found on the forum but doesn't seem to work anymore.

Last try was to replace <body> in header.twig to :

Code: Select all

<?php if (!isset($_GET['route']) || (isset($_GET['route']) && $_GET['route'] == 'common/home')) { ?>
<body style="background-image: url(imgurl);
    background-size: contain;">
  <?php } else { ?>
<body>
<?php }?>
Still got the background on all of my page (product, chekout ... all )

Im on opencart 3.1.0.0 and with twig file not tpl
Last edited by BYOLARIS4 on Wed Jan 15, 2020 5:03 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Jan 02, 2020 6:01 am

Post by letxobnav » Wed Jan 15, 2020 3:10 am

Im on opencart 3.1.0.0 and with twig file not tpl
does that look like twig or tpl?

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by BYOLARIS4 » Wed Jan 15, 2020 3:33 am

letxobnav wrote:
Wed Jan 15, 2020 3:10 am
Im on opencart 3.1.0.0 and with twig file not tpl
does that look like twig or tpl?
i only work with twig files

Newbie

Posts

Joined
Thu Jan 02, 2020 6:01 am

Post by by mona » Wed Jan 15, 2020 3:50 am

I have a beautiful module for that
https://www.opencart.com/index.php?rout ... n_id=26852

If you want to do that yourself - why are your making your life complicated ?
add the image to the home.twig
If you want to make it more complicated .. I have a beautiful module for that :)

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by BYOLARIS4 » Wed Jan 15, 2020 5:02 am

by mona wrote:
Wed Jan 15, 2020 3:50 am
I have a beautiful module for that
https://www.opencart.com/index.php?rout ... n_id=26852

If you want to do that yourself - why are your making your life complicated ?
add the image to the home.twig
If you want to make it more complicated .. I have a beautiful module for that :)
add it via home.twig was the solution thanks very much !

Newbie

Posts

Joined
Thu Jan 02, 2020 6:01 am
Who is online

Users browsing this forum: No registered users and 33 guests