How to add custom html to homepage only?
Hi everyone, I asked this on Stackoverflow but still no answers.
I'm developing an X-Cart 5 site and need to add custom html on the homepage (a.k.a. storefront). Using the X-Cart development documentation, I created a custom module and added the modifications to the Crisp White template using the @ListChild directive inside my TWIG files. But, since I used ListChild with list=center.bottom , my custom module shows on every page. We want the code to appear only on the home page. I have several questions: 1.Which @ListChild values can I use to display the module only on homepage? 2.Is there a website where I can see a list of all the available @ListChild values? I searched in X-Cart documentation and can't find a list of available ListChild positions. 3.If it's not possible using ListChild, I know we can query the current page inside the template. How to test if the current page is the homepage? Thanks for all the help. |
Re: How to add custom html to homepage only?
|
Re: How to add custom html to homepage only?
Quote:
@cflsystems Thank you. I tried inserting the code found in that thread and still doesn't work. Here is my twig file code, maybe I'm writing something incorrectly Code:
{## |
Re: How to add custom html to homepage only?
You are trying smarty code while 5.3.x uses twig
This is the thread to follow https://forum.x-cart.com/showthread.php?t=75705 The other one you can use as a reference what other targets can be used |
Re: How to add custom html to homepage only?
@cflsystems Thank you. My mistake. It worked perfectly now!
|
All times are GMT -8. The time now is 12:19 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.