| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
smarty variable for welcome page? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() which smarty template variable differentiates the initial home page (welcome page) from the rest catalog pages? In other words, in all these pages (home welcome page and any category/product viewing pages) the "$main" variable is set to "catalog". Is there any other smarty variable through which the code could differentiate between being in the welcome page and being in another catalog page? (after I did the usual smarty.php modification for outputting smarty variable values in the debug console, I have searched for any related assigned template variable but I couldn't find anything).
__________________
Vasilis Vrontisis X-Cart Development, Maintenance & Customization https://[URL="http://www.craftforweb.com"]craftforweb.com[/url] vasilis@craftforweb.com |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() This is for the home page:
$main eq "catalog" && $current_category.category eq ""
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() thanks pauldodman.
I had realized something about the "$current_category" variable but your response was so fast, I didn't have enough time to discover that myself ![]() Also, I would like to add something for the sake of some more tips from my part.... I have modified the home page so that it doesn't output the root categories initially. These are output when the visitor clicks on a "Our Products" hard-coded link in the navigation menu. For this, I injected a custom variable $display_cats in the template code, with it's value set to "Y" when the visitor clicks on the "Our Products" link and the root categories display. So, since I want to differentiate the home page from this page also (i.e. the root categories display page), I also added the $display_cats variable in the conditional statement of smarty,so the code knows that the home page is displayed, and not the page which displays the root categories, i.e. Code:
Thanks again...
__________________
Vasilis Vrontisis X-Cart Development, Maintenance & Customization https://[URL="http://www.craftforweb.com"]craftforweb.com[/url] vasilis@craftforweb.com |
|||||||||
|
|||
X-Cart forums © 2001-2020
|