| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
$smarty->assign("main", "home"); how it goes to home.tpl | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
$smarty->assign("main", "home"); how it goes to home.tpl
on $smarty->assign("main", "home");
this will retrive the home.tpl. On which file does it do it, so that it should bring home.tpl. I wanted to do the same let is say register1 which should bring register1.tpl i that new y created . but it give page not found. any hint will be appreciated also when it says ("admin/home.tpl", $smarty); what the $smarty object does here does it have any value?
__________________
XCart Ver. 4.0.14-gold_upgrade |
|||||||
#2
|
|||||||
|
|||||||
Re: $smarty->assign("main", "home"); how it goes to home.tpl
func_display("customer/home.tpl",$smarty); says to display skin1/customer/home.tpl
skin1/customer/home.tpl will include skin1/customer/home_main.tpl which looks at the value of "main" to decide which other template to include. "main" is set by the $smarty->assign("main", "home"); statement. The $smarty object is the smarty templating engine - its what makes he pages display so you must have it. So to display the page you would put these statements in your php: $smarty->assign("main", "register1"); func_display("customer/home.tpl",$smarty); Then tweak skin1/customer/home_main.tpl to check for "main" equal to register1 and include your new template.
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
#3
|
|||||||
|
|||||||
Re: $smarty->assign("main", "home"); how it goes to home.tpl
thanks geckoday for your quick respons,
In my admin/home.php I have func_display("admin/home.tpl", $smarty); however on the skin1/admin/ there is no home.tpl file. I just cant understand where is this admin home.tpl file? Also as you metioned that skin1/customer/home_main.tpl : is there any skin1/admin/???_main.tpl or any file where I can twick the "main" value for admin area?. thanks
__________________
XCart Ver. 4.0.14-gold_upgrade |
|||||||
#4
|
|||||||
|
|||||||
Re: $smarty->assign("main", "home"); how it goes to home.tpl
Sorry, I missed the admin part of it. In admin things get a little weird. For X-Cart Gold it works like this, not sure about X-Cart Pro. To display the page the statements are:
@include $xcart_dir."/modules/gold_display.php"; func_display("admin/home.tpl", $smarty); That include is what makes things weird. If the user is setup as fulfillment staff it displays skin1/fulfilment/home.tpl otherwise it displays skin1/single/home.tpl Those are the two files you need to tweak to check main for your page name and include it.
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
|
|||
X-Cart forums © 2001-2020
|