On 17-09-2008 at 14:57:59 Zbyněk Nevrlý <[EMAIL PROTECTED]> wrote:

I have a several question about variables in PHPTAL templates:

1) How to put phptal variable to string. Here is code. I want to get
variable nestedItem['m_obrazek'] to property onclick.

You can use PHP syntax:
${php:nestedItem['m_obrazek']} ← notice php: prefix

or TALES syntax:
${nestedItem/m_obrazek} ← no prefix

2) Similar problem in other source code. I have a PHPTAL variable called
"language" and I need to fetch into string like in PHP "poznamka_$language".
But how in PHPTAL?


item["poznamka_" . language]

3) It's all about the same. I need to fetch PHPTAL variable... please see
below and HERE PHPtal variable :)

<a href="#"><img name="imageBox" src="${path}/images/budova.jpg" id="imgBox"
tal:attributes="src php: picturesList[<HERE PHPTAL variable>][HERE PHPTAL
variable]" /></a> </div>


regards, Kornel

PHPTAL mailing list

Reply via email to