webGuy
webGuy

Reputation: 163

Use a variable inside a variable in Smarty 2 template

I am trying to use a smarty variable inside a smarty variable in a template.

The following will work in smarty 3 but not in smarty 2:

{$_content_{$id}.content_title}

to display for example:

{$_content_10.content_title}

In smarty 2 it only throws an error. Is there any way to do this in smarty 2?

Upvotes: 0

Views: 47

Answers (0)

Related Questions