View Single Post
  #1  
Old 05-30-2006, 06:54 AM
  rubyaryat's Avatar 
rubyaryat rubyaryat is offline
 

eXpert
  
Join Date: Feb 2003
Location: Canada
Posts: 289
 

Default Displaying smarty variables inside smarty variables

I recently revisited this problem and thought I'd share the solution.
Say you're setting up the help/conditions_customers.tpl page.
You want the smarty language variable:
{$lng.txt_conditions_customer}

to contain something like:


{$config.Company.location_address}

{$config.Company.location_city}, {$config.Company.location_state} {$config.Company.location_zipcode}


The trick is, in help/conditions_customers.tpl, instead of using the statement:
{$lng.txt_conditions_customer}

use:

{eval var=$lng.txt_conditions_customer}


This will render the smarty variables within the smarty variable {$lng.txt_conditions_customer}.

Hope this helps someone,
Rubyaryat
__________________
Rubymods.com - Your X-Cart services partner for over 9 years.
Modules offered: FedEx labels, Live currency rates, GeoIP, Order Audit, Multiple e-goods.
X-Cart Store Hosting, project management and affiliates program available.
4.2.3 gold [Unix]
Reply With Quote