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.
${nestedItem['m_obrazek']}

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?

php:nl2br(htmlspecialchars(item["poznamka_${language}"]))'>

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>

php:picturesList[somePHPTALvariable][anotherPHPTALvariable]

--
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to