| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
If else function on home.php | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi guys,
I am looking for a code that displays only in home.php example: Quote:
I know php, but am new to smarty.. Basically what I did was I inserted an image tpl right before "welcome" text, but now, the image tpl appears in every page including category page and each individual item page... How can I just display on home.php?
__________________
X-Cart Ver: 4.1.9 Gold X-Cart Ver: 4.1.10 Gold |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Code:
|
|||||||||
#3
|
|||||||
|
|||||||
![]() Thankyou!!
What does $main and $current_category mean? That seems like a variable to me..? Also we can write the opposite code too ? Quote:
__________________
X-Cart Ver: 4.1.9 Gold X-Cart Ver: 4.1.10 Gold |
|||||||
#4
|
|||||||||
|
|||||||||
![]() $main and $current_category are both variables.
$main is a variable that is used to tell the internal workings what page to load. When $main eq "catalog" it is either loading the main page, or a category. When loading a category, the $current_category variable is populated. So the code I provided loads when the catalog section is loaded (main or category page) and when the $current_category variable is empty (so we know we are on the main page and not a category page). Yes you can write the opposite, whether or not it will do what you want depends on what you want to accomplish ![]() |
|||||||||
#5
|
|||||||
|
|||||||
![]() Thankyou for your kind answer! Things are getting a little clear once I started to understand the consept. It's still different from standard PHP, so I have a hard time, but hopefully I get it!
Thanks again!!!
__________________
X-Cart Ver: 4.1.9 Gold X-Cart Ver: 4.1.10 Gold |
|||||||
|
|||
X-Cart forums © 2001-2020
|