Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to make all Smarty tags global?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-07-2011, 01:53 PM
 
Johny1 Johny1 is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 72
 

Arrow How to make all Smarty tags global?

Hi guys,

I want to be able to use ALL smarty tags on any page I want.

Currently I cannot get things like user's membership level and user's address details on embedded static pages.

Thanks
__________________
X-Cart Gold 4.5.4
Reply With Quote
  #2  
Old 01-12-2011, 12:23 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: How to make all Smarty tags global?

You should enable "Parse Smarty tags in the content of embedded static pages" option.

Second, you should assign the necessary variables via PHP to access them in Smarty.

e.g. to be able to use login on static pages you should add:
PHP Code:
$smarty->assign("login"$login); 
before call to func_display function in the pages.php script.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:52 PM.

   

 
X-Cart forums © 2001-2020