I believe Petal, JPT, and several other versions of java TAL do take
parameters using the path notation, however phptal seems to keep closer
to the TAL spec.  If it is necessary to use parameters you will have to
use php: ...

Best regards,
Levi Stanley

Scott Trevithick wrote:
> Hello all,
> I am new to PHPTAL and have a question about the syntax of calling a
> method with a parameter.
>
> Say I have a tag:
> <h1 tal:content="object/getTitle">sample title</h2>
>
> No problem. But what if I want to pass in one or more parameters, such
> as $object->getTitle($param1, $param2)? What does the syntax look like?
>
> A wild guess:
> <h1 tal:content="object/getTitle(param1,param2)">sample title</h2>
>
> I haven't tried this and I suppose it might work, but it does not look
> right. I've scoured the online manual tried some Google searches and
> cannot find any examples.
>
> Do I have to resort to tal:content="php:
> object.getMethod($param1,$param2)  ?
>
> thanks in advance,
>
> -- 
>
> Scott Trevithick
> sc...@trevithick.ca <mailto:sc...@trevithick.ca>
> 416-876-0811
>         
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>   

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

Reply via email to