Question

In my web-application I use egotech4 with Smartry-Script in html.

I have some variables named e.g.

{$page->extra.name878}

but I need to get their values without know the number at the end, this number I can get from an other variable {$item->field.id}

so I tried something like:

{assign var=name value="extra.name`$item->field.id`"}
 <h4>{$page->$name}</h4>

But it doesn't work, it seems not to find the value of the property extra.nameXYZ of the $page variable.
Sadly I can not use any php-code for this I need to get it working with SMARTY only.

Can anyone help me?

Was it helpful?

Solution

I solved my Problem:

use:

{assign var=name value="name`$item->field.id`"}

instad of:

{assign var=name value="extra.name`$item->field.id`"}

and read it out with:

{$page->extra.$name}

Many thanks goes to Dan Günther from EGOTECH-Support who gave me that hint.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top