View Single Post
  #5  
Old 10-05-2009, 11:08 AM
 
thisclicks thisclicks is offline
 

Newbie
  
Join Date: Dec 2006
Posts: 7
 

Default Re: Using Smarty or PHP in cateogry descriptions to reference language strings

Quote:
Originally Posted by Jon
It won't work since smarty tags won't be processed. You'd probably have to set a variable in your text like ##yourvariable## and then in your home.php file use something like:

Code:
if ($current_category['description'] != '') $current_category['description'] = str_replace('##yourvariable##',func_get_langvar_by_name('lbl_my_text'),$current_category['description']);

Is there a way to make this a little smarter? So I don't have to put an IF statement for each $lng VAR?

Could it somehow evaluate the ##yourvariable## and attached it to $lng.yourvariable ? Would that be some kind of eval function? Thanks for the help.

Thanks,

Chad
__________________
-Chad
Reply With Quote