X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Passing variables to the included .tpl (https://forum.x-cart.com/showthread.php?t=2921)

YuriC 05-29-2003 11:50 AM

Passing variables to the included .tpl
 
can someone tell me where's my error..
i'm passing a variable to the included file; I understand that if var is defined in .tpl file only, it is local - and included file should read that variable just fine...

Code:

{include file="dialog.tpl" title=$product.producttitle content=$smarty.capture.dialog extra="width=100%" b_image="../files/bgs/couple_bg1.jpg"}

then I have
Code:

{$b_image}
inside of dialog.tpl to see if it works... nothing gets printed

shan 05-29-2003 03:52 PM

try it with your image stored in skin1/images then reference it as

b_image=".$ImagesDir/couple_bg1.jpg."

YuriC 05-30-2003 04:27 AM

It is not the image
 
It is not the image... the a var cannot be read... even if I do it as a text b_image="test"... {b_image} is empty

shan 05-30-2003 04:31 AM

have you seen the smarty forums over at

http://www.phpinsider.com/smarty-forum/

see if that helps


All times are GMT -8. The time now is 03:09 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.