| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to add custom html to homepage only? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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.
__________________
xcart v5.3.3.4 [linux] |
|||||||
#3
|
|||||||
|
|||||||
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:
__________________
xcart v5.3.3.4 [linux] |
|||||||
#4
|
|||||||||
|
|||||||||
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
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
Re: How to add custom html to homepage only?
@cflsystems Thank you. My mistake. It worked perfectly now!
__________________
xcart v5.3.3.4 [linux] |
|||||||
|
|||
X-Cart forums © 2001-2020
|