![]() |
If Home?
is there an if home statement?
|
Re: If Home?
Please let us have a bit more details on what you want to achieve.
Do you want to check if it's the home page somewhere inside a custom template? What is the template? |
Re: If Home?
Quote:
|
Re: If Home?
There is no template variable that could say whether it is the home page, or not.
However, doing this check is a somewhat easy task. In your custom module/theme decorate \XLite\Controller\Customer\ACustomer class and add the following method: Code:
public function isHomePage() Now you can use this in any storefront template as follows (any of the following will work): 1. Code:
<div IF="isHomePage()">....your code goes there...</div> 2. Code:
{if:isHomePage()} |
Re: If Home?
I don't understand tis portion.
In your custom module/theme decorate \XLite\Controller\Customer\ACustomer class and add the following method: I have classes/XLiter/Module/TechChicks/ChampionSkin/Main.php Where do I put Code:
public function isHomePage() |
Re: If Home?
Make a new class in your module that decorates the class.
Create: classes/XLite/Module/TechChicks/ChampionSkin/Controller/Customer/Customer.php Code:
<?php |
All times are GMT -8. The time now is 09:00 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.