| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
show only block the home | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
show only block the home
Hello.
I am developing a new skin for xcart 5, what I need it is to show a block just before the general footer, but is only visible on the main page, but can not find one anywhere to create such conditional sentence. I appreciate your help, and sorry for my English |
|||||||
#2
|
|||||||||
|
|||||||||
Re: show only block the home
This is how you can check if it is the home page:
PHP Code:
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: show only block the home
And this is how you can inject your template or widget class between the main area and the footer:
PHP Code:
Or you can use "center.bottom" list instead of "layout.main.center".
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#4
|
|||||||
|
|||||||
Re: show only block the home
So where you should put these codes in order to do what I want?
I tried using a center_bottom.tpl, but has not worked for me Thank you very much for your help |
|||||||
#5
|
|||||||||
|
|||||||||
Re: show only block the home
You should:
1. Create a custom module 2. Add a new template file (if the block is plain HTML), or a new widget class with its own set of templates files (.tpl, .css, .js - when needed). 3. Add the @ListChild directive to the comments in the file - this will add this file into the specified list on the next site re-deploy 4. Add isVisible() method and put the page-checking logic there (so it will return false if the page is not the home)
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|