| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Only on home page? | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I want to add an h tag and a div right after body tag but I only want it to display on the home page not on any other pages in the store.
What is the if tag I can wrap my code in to have it only display on the home page? I don't know what variable to check. |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Code:
|
|||||||||
#3
|
|||||||
|
|||||||
![]() Thanks Jon!!
|
|||||||
#4
|
|||||||
|
|||||||
![]() Sorry mate, I am new in this field. I also have same needs about this.
Could you tell where/which file should I put these code in? Thanks.
__________________
Cheers, Ice Cream Xcart Gold 4.0.17 Fancy Category 4.0.17 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Where you put the code depends on where you want whatever it is to appear.
Likely either skin1/customer/home.tpl or skin1/customer/main/welcome.tpl |
|||||||||
#6
|
|||||||
|
|||||||
![]() Thanks. That's help me.
__________________
Cheers, Ice Cream Xcart Gold 4.0.17 Fancy Category 4.0.17 |
|||||||
#7
|
|||||||
|
|||||||
![]() Thank you! It helped me too.
From where the $main variable is assigned its contents? |
|||||||
#8
|
|||||||||
|
|||||||||
![]() skin1/customer/home_main.tpl uses the main variable to determine what contents to display.
|
|||||||||
#9
|
|||||||
|
|||||||
![]() Hi,
Thank you for answering. Sorry but I will return to my previous question because I think that I didn't get an answer. Maybe my question is silly, but I am a newbie to x-cart customization. A snapshot from the skin1/customer/home_main.tpl file shows that there is somehow a $main variable that something has put a value in it. ----------------------------------------------------------- {elseif $main eq "returns"} {include file="modules/RMA/returns.tpl"} {elseif $main eq "register"} {include file="customer/main/register.tpl"} {elseif $main eq "download"} {include file="modules/Egoods/main.tpl"} {elseif $main eq "send_to_friend"} {include file="customer/main/send_to_friend.tpl"} ----------------------------------------------------------- That way we can compare if this value is what we need. My question is from where the $main gets its value, or better what function sets the value of $main. I have already did a search on x-cart files, but I haven't found an answer... Thank you in advance for your time and effort. |
|||||||
#10
|
|||||||||
|
|||||||||
![]() The main variable is set in the form:
$smarty->assign("main","whatever"); Most of these variable sets are in the main PHP files being called, but some are in the files elsewhere. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|