<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.php.phptal.general">
    <title>gmane.comp.php.phptal.general</title>
    <link>http://blog.gmane.org/gmane.comp.php.phptal.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1887"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1886"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1885"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1884"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1883"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1882"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1881"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1880"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1879"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1878"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1877"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1876"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1875"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1874"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1873"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1872"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1871"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1870"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1869"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.php.phptal.general/1868"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1887">
    <title>How to pass variable to Ztal Mail template</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1887</link>
    <description>&lt;pre&gt;Ok . I figured it out.

Short docs. Maybe someone will need this.

Ztal is looking for email templates inside 
...application/modules/[module name]/views/emails/[templateName].email

You could use html and plain text templates.
Inside template file You should register macro.

For HTML emails:
&amp;lt;tal:block metal:define-macro="html"/&amp;gt;

For plain text emails:
&amp;lt;tal:block metal:define-macro="plain"/&amp;gt;

Then You should create instance of \Ztal\Mail

$mail = new \Ztal\Mail('UTF-8'); // BTW, Robert Goldsmith. Maybe UTF-8 should be set as default encoding?

If some variables were defined inside template then before executing setBodyHtmlFromTemplate() or setBodyTextFromTemplate() You should pass that variables to global view:
$this-&amp;gt;view-&amp;gt;someVariable = 'test';

You can now register template:
$mail-&amp;gt;setBodyHtmlFromTemplate('templateName');

And if Zend_Application_Resource_Mail was registered with all options
$mail-&amp;gt;send()

will just send mail.
&lt;/pre&gt;</description>
    <dc:creator>aaatoja</dc:creator>
    <dc:date>2013-06-18T10:07:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1886">
    <title>How to pass variable to Ztal Mail template</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1886</link>
    <description>&lt;pre&gt;I'm having problems with passing variables to ZTal mail class.

Let's say I have template:
&amp;lt;tal:block metal:define-macro="html"&amp;gt;
    &amp;lt;h1 tal:condition="exists:test" tal:content="test"&amp;gt;&amp;lt;/h1&amp;gt;
    &amp;lt;p&amp;gt;some text&amp;lt;/p&amp;gt; 
&amp;lt;/tal:block&amp;gt;

And in Controller:
$mail = new \ZTal\Mail('UTF-8');
            
$mail-&amp;gt;addTo('email')-&amp;gt;setSubject('subject');
$t = $mail-&amp;gt;setBodyHtmlFromTemplate('register');
$t-&amp;gt;view-&amp;gt;test = 'aaaaaaa';
echo $mail-&amp;gt;getBodyHtml()-&amp;gt;getContent();

I tried combinations like $mail-&amp;gt;view-&amp;gt;test, $mail-&amp;gt;view-&amp;gt;ztalMailMacro-&amp;gt;test etc.

Please help.
&lt;/pre&gt;</description>
    <dc:creator>aaatoja</dc:creator>
    <dc:date>2013-06-18T09:37:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1885">
    <title>Re: Expression chains and boolean false, possible bug</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1885</link>
    <description>&lt;pre&gt;

That's a good question.

Currently the implementation uses `||` operator and `phptal_isempty()`  
that includes `false`, and tests ensure that current behavior is  
"correct", so for now the answer is that documentation is wrong.


I think the logic behind the documentation was to pick the first value  
that "exists", even if it's false. That makes sense to me, but I wonder if  
others are expecting `|` to behave like PHP's `||`.

&lt;/pre&gt;</description>
    <dc:creator>Kornel Lesiński</dc:creator>
    <dc:date>2013-06-14T00:08:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1884">
    <title>Expression chains and boolean false, possible bug</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1884</link>
    <description>&lt;pre&gt;Hi, 

The manual says on expression chains:
While evaluating expressions separated by '|', PHPTAL will stop its 
evaluation when an expression value is not null and no error was raised while 
evaluating the expression.

However, whenever one of the expressions evaluates to boolean 'false' (not 
null) PHPTal will skip the expression and move on to the next. So the 
following expression chain would evaluate to true:
"null | false | true"

Is the documentation incorrect or is this a bug in the expression chain?

Kind regards,
Bas Kooij
&lt;/pre&gt;</description>
    <dc:creator>Bas Kooij</dc:creator>
    <dc:date>2013-06-13T13:31:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1883">
    <title>Re: Variable interpolation inside structure'd expression</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1883</link>
    <description>&lt;pre&gt;Hi, Robert,

I used to do what you suggested for href, but later I learned a shorter and
more readable way — the way I showed: &amp;lt;a
href="${somevar}/morestuff"&amp;gt;text&amp;lt;/a&amp;gt;.

As for the gist of my question, see Iván's answer. I will try his
suggestion.

Roman



On Thu, May 30, 2013 at 3:02 AM, Robert Goldsmith &amp;lt;rgoldsmith-ekKPKLigxzH10XsdtD+oqA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;wrote:

_______________________________________________
PHPTAL mailing list
PHPTAL-CzyLcWPZiU5MT9OEwdum/5owlv4uC7bZ&amp;lt; at &amp;gt;public.gmane.org
http://lists.motion-twin.com/mailman/listinfo/phptal
&lt;/pre&gt;</description>
    <dc:creator>romtek</dc:creator>
    <dc:date>2013-05-31T05:33:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1882">
    <title>Re: Variable interpolation inside structure'd expression</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1882</link>
    <description>&lt;pre&gt;In the original PhpTal it was not possible to automatically parse 
arbitrary strings, I don't know if this feature has been introduced in 
later releases.

The common approach is to execute the string as a template, introducing 
the result in the actual template context. If this is a pattern that 
repeats itself quite a bit, you can wrap that functionality inside a 
custom modifier so that you can do stuff like this:

&amp;lt;div tal:content="structure tpl:product/descr"&amp;gt;...&amp;lt;/div&amp;gt;

regards,
/imv
_______________________________________________
PHPTAL mailing list
PHPTAL-CzyLcWPZiU5MT9OEwdum/5owlv4uC7bZ&amp;lt; at &amp;gt;public.gmane.org
http://lists.motion-twin.com/mailman/listinfo/phptal
&lt;/pre&gt;</description>
    <dc:creator>Iván Montes</dc:creator>
    <dc:date>2013-05-30T08:11:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1881">
    <title>Re: Variable interpolation inside structure'd expression</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1881</link>
    <description>&lt;pre&gt;Hello :)

I'm not sure I understand your problem but for the href you should prob. do something like:

&amp;lt;a tal:attributes="href string:${appURL}/the-rest-of-the-path"&amp;gt;some text&amp;lt;/a&amp;gt;

Robert
-----
Robert Goldsmith
rgoldsmith-ekKPKLigxzH10XsdtD+oqA&amp;lt; at &amp;gt;public.gmane.org




On 30 May 2013, at 05:21, romtek &amp;lt;romtek-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Robert Goldsmith</dc:creator>
    <dc:date>2013-05-30T08:02:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1880">
    <title>Variable interpolation inside structure'd expression</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1880</link>
    <description>&lt;pre&gt;Hi,

I need help with something... I have the following in my template:

&amp;lt;div tal:content="structure product/descr"&amp;gt;full product description
here&amp;lt;/div&amp;gt;

Values of product/descr are taken from a database. This works. However, I
wanted to include a path to the app in links like so: &amp;lt;a
href="${appURL}/the-rest-of-the-path"&amp;gt;some text&amp;lt;/a&amp;gt;. This tag is in the
database as a part of the product/descr. Interpolation didn't work. Is it
supposed to? If not, is there another approach to achieve what I need?

Roman
_______________________________________________
PHPTAL mailing list
PHPTAL-CzyLcWPZiU5MT9OEwdum/5owlv4uC7bZ&amp;lt; at &amp;gt;public.gmane.org
http://lists.motion-twin.com/mailman/listinfo/phptal
&lt;/pre&gt;</description>
    <dc:creator>romtek</dc:creator>
    <dc:date>2013-05-30T04:21:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1879">
    <title>Re: Code Generator refactoring</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1879</link>
    <description>&lt;pre&gt;Hey Kornel,

First of all I want to tell you that the idea is really great!

But I'm wondering if it wasn't better to adopt something like
https://github.com/nikic/PHP-Parser for this.

I don't think it's PHPTal's job to optimize the AST, and since there's
already an AST lib out there that has gained a lot of interest (I think
it's used also by the latest wonders of https://github.com/ircmaxell/PHPPHP).

Optimizers will come for sure since I'm wondering if I can use PHP-Parser
also in doctrine/common :P

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 8 January 2013 23:43, Kornel Lesiński &amp;lt;kornel-udEhUVBD/jfk1uMJSBkQmQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

_______________________________________________
PHPTAL mailing list
PHPTAL-CzyLcWPZiU5MT9OEwdum/5owlv4uC7bZ&amp;lt; at &amp;gt;public.gmane.org
http://lists.motion-twin.com/mailman/listinfo/phptal
&lt;/pre&gt;</description>
    <dc:creator>Marco Pivetta</dc:creator>
    <dc:date>2013-01-09T00:51:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1878">
    <title>Code Generator refactoring</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1878</link>
    <description>&lt;pre&gt;
A while ago I thought about creating PHP *optimizer*. The goal is to make  
PHPTAL-generated code as efficient as hand-written code, e.g. merge  
adjacent strings and echo statements (implemented) and avoid pushState()  
calls or maintenance of repeat/xx/key variables when those features are  
not used (not implemented yet).

To achieve this I've refactored PHPTAL's code generator to create sort-of  
Abstract Syntax Tree/intermediate representation mix. Generated code uses  
classes such as PHPTAL_Expr_Echo and PHPTAL_Expr_If, and these can be  
inspected, modified, optimized, etc.

I've released work-in-progress code:

https://github.com/pornel/PHPTAL/tree/AST


Is anybody in the mood for writing an optimizing PHP compiler? :)

&lt;/pre&gt;</description>
    <dc:creator>Kornel Lesiński</dc:creator>
    <dc:date>2013-01-08T22:43:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1877">
    <title>Please vote for PHPTAL support in Web Essentials extensionfor Visual Studio</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1877</link>
    <description>&lt;pre&gt;http://webessentials.uservoice.com/forums/140520-general/suggestions/3409596-support-for-phptal

Please vote even if you don't use VS.
_______________________________________________
PHPTAL mailing list
PHPTAL-CzyLcWPZiU5MT9OEwdum/5owlv4uC7bZ&amp;lt; at &amp;gt;public.gmane.org
http://lists.motion-twin.com/mailman/listinfo/phptal
&lt;/pre&gt;</description>
    <dc:creator>romtek</dc:creator>
    <dc:date>2012-12-06T19:31:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1876">
    <title>switch-block</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1876</link>
    <description>&lt;pre&gt;
I suppose it's not possible yet, but for some instances it would be 
great to have some kind of "switch" block, like in PHP, which allows for 
a "default" output.  We can use tal:condition, but (unless I missed it), 
there is no 'default' or 'else' possible.

It's easy enought to check if "errorcode" eq 'value1', and below if 
"errorcode" eq 'value2' etc, but the tal:condition for when errorcode ne 
'value1' AND ne 'value2' AND ne 'value3' is rather cumbersome...


Just a 'nice to have' from my list... :)
&lt;/pre&gt;</description>
    <dc:creator>GRolf</dc:creator>
    <dc:date>2012-10-27T09:40:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1875">
    <title>Localization confusion</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1875</link>
    <description>&lt;pre&gt;Hi,

While putting my localization strings in place I discovered an interesting
quirk that perhaps someone could explain.

This is my construct:

&amp;lt;title tal:content="title|default" i18n:translate=""&amp;gt;foo bar&amp;lt;/title&amp;gt;

The idea is that a page can override the default page title by setting the
title variable. If not specified, the page title should be translated from
whatever is in the template (i.e. "foo bar").

The outcome of my construct is I18N("foo bar") . "foo bar" - the
translation of "foo bar" followed by "foo bar" itself. Setting the title
variable has no effect.

Has anyone come across this? And is there an easy fix for what I need?

Version = 1.2.2


&lt;/pre&gt;</description>
    <dc:creator>Tjerk Meesters</dc:creator>
    <dc:date>2012-10-15T02:44:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1874">
    <title>Re: How to add customized namespace-attribute out of thePhptal repository</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1874</link>
    <description>&lt;pre&gt;Your class can be called whatever you wish and can be either manually required before first use or loaded using any available autoloader. You can put it wherever you like :)

We work heavily with Zend Framework and so use autoloaders and Symphony has a similar system but feel free to keep things simple and require the class manually as long as you do so before the point you call 'PHPTAL_Dom_Defs::getInstance()-&amp;gt;registerNamespace(new MyNewNS());'

Robert
-----
Robert Goldsmith
rgoldsmith-ekKPKLigxzH10XsdtD+oqA&amp;lt; at &amp;gt;public.gmane.org


&lt;/pre&gt;</description>
    <dc:creator>Robert Goldsmith</dc:creator>
    <dc:date>2012-09-25T12:15:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1873">
    <title>Re: How to add customized namespace-attribute out of thePhptal repository</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1873</link>
    <description>&lt;pre&gt;Loading your own namespace would not prevent PHPTAL's built in attributes, I think.

But note that registering namespace costs much to load PHPTAL's parser engine.

So I'm using pre-filter mechanism to load my namespace classes because
PHPTAL_PreFilter class is very small and not related to other parts of PHPTAL.

When I already have parsed template in my cache dir, it does never cost to load
parser engine and namespaces. Then the filter() method would be ignored
instead cached code would be used.  I can pay to just only PHPTAL_PreFilter :)


On 2012/09/20, at 23:31, Clouts wrote:


&lt;/pre&gt;</description>
    <dc:creator>Hisateru Tanaka</dc:creator>
    <dc:date>2012-09-25T11:44:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1872">
    <title>How to add customized namespace-attribute out of the Phptal repository</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1872</link>
    <description>&lt;pre&gt;I've added my own namespace using:
PHPTAL_Dom_Defs::getInstance()-&amp;gt;registerNamespace(new MyNewNS());

And defined the NS class as:
/* ************************************
  *
  */ /* ***************************** */
class MyNewNS extends PHPTAL_Namespace_Builtin
{
/* ************************************
  *
  */ /* ***************************** */
     public function __construct(){
         parent::__construct('MyNewNS', 'http://ctrlogic.net/tpl/phptal/ns');
         $this-&amp;gt;addAttribute(new PHPTAL_NamespaceAttributeSurround('att', 4));
     }
}

And defined the Attribute class as:
/* ************************************
  *
  */ /* ***************************** */
class PHPTAL_Php_Attribute_MyNewNS_att extends PHPTAL_Php_Attribute
{
/* ************************************
  *
  */ /* ***************************** */
     public function before(PHPTAL_Php_CodeWriter $codewriter)
     {
$code = &amp;lt;&amp;lt;&amp;lt;code
Some php code here
code;
         $codewriter-&amp;gt;pushCode($code);
     }
/* ************************************
  *
  */ /* ***************************** */
     public function after(PHPTAL_Php_CodeWriter $codewriter)
     {
     }
}

Is there any way not having this attribute class inside the PHPTAL  
installed repository?

I want to have it outside the PHPTAL installed repository...

Would preloading it prevent PHPTAL from searching the class inside its  
own installed repository?
&lt;/pre&gt;</description>
    <dc:creator>Clouts</dc:creator>
    <dc:date>2012-09-20T14:31:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1871">
    <title>Re: variable variables in phptal?</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1871</link>
    <description>&lt;pre&gt;great - that works as expected!
thanks for the help.


GRolf

On 29/08/2012 20:07, Piotr Kroczyński wrote:
&lt;/pre&gt;</description>
    <dc:creator>GRolf</dc:creator>
    <dc:date>2012-08-30T08:02:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1870">
    <title>Re: variable variables in phptal?</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1870</link>
    <description>&lt;pre&gt;Sorry, I gave you a bad example (I wasn't using phptal for some time), 
this one is better and simplier:

&amp;lt;div tal:repeat="field fieldnames"&amp;gt;
${field/description}: &amp;lt;span tal:replace="person/${field/key}"&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;

W dniu 29.08.2012 16:12, Marco Pivetta pisze:

&lt;/pre&gt;</description>
    <dc:creator>Piotr Kroczyński</dc:creator>
    <dc:date>2012-08-29T18:07:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1869">
    <title>Re: variable variables in phptal?</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1869</link>
    <description>&lt;pre&gt;If I remember correctly you can use something like this:

&amp;lt;div tal:repeat="field fieldnames"&amp;gt;
&amp;lt;span tal:omit-tag="true" tal:content="${field/description}"&amp;gt;: 
&amp;lt;/span&amp;gt;&amp;lt;span tal:omit-tag="true" tal:content="person/${field/key}"&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;


W dniu 29.08.2012 16:12, Marco Pivetta pisze:

&lt;/pre&gt;</description>
    <dc:creator>Piotr Kroczyński</dc:creator>
    <dc:date>2012-08-29T17:53:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1868">
    <title>Re: variable variables in phptal?</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1868</link>
    <description>&lt;pre&gt;Use the ArrayAccess interface and implement your own iterator in your
Person object, no?

http://php.net/manual/en/class.arrayaccess.php

Marco Pivetta

http://twitter.com/Ocramius

http://marco-pivetta.com



On 29 August 2012 15:39, GRolf &amp;lt;gerolf-qlQzkB1d4xrWaLmNpJ3xJ9BPR1lH4CV8&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

_______________________________________________
PHPTAL mailing list
PHPTAL-CzyLcWPZiU5MT9OEwdum/5owlv4uC7bZ&amp;lt; at &amp;gt;public.gmane.org
http://lists.motion-twin.com/mailman/listinfo/phptal
&lt;/pre&gt;</description>
    <dc:creator>Marco Pivetta</dc:creator>
    <dc:date>2012-08-29T14:12:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.php.phptal.general/1867">
    <title>variable variables in phptal?</title>
    <link>http://permalink.gmane.org/gmane.comp.php.phptal.general/1867</link>
    <description>&lt;pre&gt;


Is it possible to use variable variables in PHPTal ?

eg I have a PHP array
$phptal-&amp;gt;fieldnames = array(array('key'=&amp;gt;'first_name', 
'description'=&amp;gt;'First Name'), array('key'=&amp;gt;'address', 
'description=&amp;gt;'Address');

and an object
$person= new stdClass();
$person-&amp;gt;first_name = 'Joe';
$person-&amp;gt;address='His_street 1';
$phptal-&amp;gt;person = $person;

and in my template I'd like to use the "key" of "fieldnames" in a repeat 
...


&amp;lt;div tal:repeat="field fieldnames"&amp;gt;
${field/description}: ${person/${field/key}}
&amp;lt;/div&amp;gt;


This doesn't work - but is there an other way to achieve it ?
&lt;/pre&gt;</description>
    <dc:creator>GRolf</dc:creator>
    <dc:date>2012-08-29T13:39:32</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.php.phptal.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.php.phptal.general</link>
  </textinput>
</rdf:RDF>
