Condition for homepage

Guido

Avatar: Guido

2022-02-04 20:58

Hi again,

I want to add some code in header but only at homepage of the site.

Is there a condition for this, similar to determine the basket page or the order page?

These work:


$config
['this_is_basket_page']
$config['this_is_order_page']



This doesn't work unfortunately:


$config
['this_is_start_page']



Guido

» Quick.Cart v6.x

Guido

Avatar: Guido

2022-02-05 13:44

I found out I can use the page ID of the body tag..

So hide/show via CSS, depending on page ID.

But this is a not so clean solution, I still prefer a PHP-condition.

openzibi

Avatar: openzibi

2022-02-05 15:29


if(isset( $aData['iPage'] ) && $aData['iPage'] == $config['start_page']) { 
            
Your code...
             }

Zbyszek - StudioStrona.pl

Guido

Avatar: Guido

2022-02-05 17:41

Great, that works as expected. Thanks!

Guido

Back to top
about us | contact