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
PHPTAL mailing list

Reply via email to