[PHPTAL] Table column with difference value

Iván -DrSlump- Montes drslump at pollinimini.net
Sun Mar 23 23:55:34 CET 2008


I haven't tried it but perhaps something like this can give you the result:

<tr tal:repeat="item data">
  <td tal:content="item/total">Total</td>
  <td tal:content="php: lastTotal">Last Total</td>
  <?php $ctx->lastTotal = $ctx->item['total']; ?>
</tr>

or

<tr tal:repeat="item data">
  <td tal:content="item/total">Total</td>
  <td>
    <?php
        echo $lastTotal;
        $lastTotal = $ctx->item['total'];
    ?>
  </td>
</tr>

ivan

On Sun, Mar 23, 2008 at 11:19 PM, Krzysztof Sikorski
<dreamer.pl at gmail.com> wrote:
> > If I could do something like tal:php :-) it would be perfect.
>  Your can use php code in expressions:
>  http://phptal.motion-twin.com/manual/en/split/ar05s07.html#tales-php
>
>  _______________________________________________
>  PHPTAL mailing list
>  PHPTAL at lists.motion-twin.com
>  http://lists.motion-twin.com/mailman/listinfo/phptal
>



More information about the PHPTAL mailing list