Hmm, take out the semi colon. And access the variable correctly? Try it without one:
tal:define="navItems php: getNavItems(sosContext)" or tal:define="navItems php: getNavItems(${sosContext})" Torsten Hinze wrote: > Ok - thx 4 hint. > i have open the file and found this > > 9 | <div class="header">Rubriken</div> > 10 | <?php > 11 |$ctx = $tpl->pushContext() ; > 12 | $ctx->navItems = getNavItems($ctx->{$ctx->sosContext}?><ul > class="closed"> > 13 | <?php > > getNavItems has missing ) and i dont know why. my getNavItems > functions has no errors and in the template this function will be used > in the following way: > > <ul class="public" > tal:define="navItems php: getNavItems($sosContext);"> > <li tal:repeat="item navItems"> > > Cant you see any error? > > After i wrote this i have see the error. I have used sosContext with > a leading $. This is wrong in PHPTAL. A classic pitfall. > > th > Kornel Lesiński schrieb: >> On 06-01-2009 at 13:24:17 Torsten Hinze <info4hide...@gmx.de> wrote: >> >>> Hello, >>> if i call my site PHPTAL return this error: >>> Parse error: syntax error, unexpected ';' in >>> C:\WINNT\Temp\tpl_1231247664_1_1_14navigation9790ed651b9881a5e44194953211b4d9.php >>> >>> on line 12 >>> >>> In the navigation.pt in line 12 i found only this >> >> This error is not in your PHPTAL template, but in compiled PHP code. >> Open the file that is in temp folder. >> >>> Any idea? >> >> This error is usually caused by syntax error in a php: expression. It >> could also be bug in PHPTAL itself. >> > > -- > +=====================================================+ > | Torsten Hinze - powered by Python | > | --------------------------------------------------- | > | Ich suche noch Hilfebietende für ein deutsches | > | Zope-Board, da viele Einsteiger erst nach Foren | > | suchen in denen sie ihre Frage stellen können. | > | | > | URL: www.forum-hilfe.de/viewforum.php?f=65 | > +=====================================================+ > > ------------------------------------------------------------------------ > > _______________________________________________ > 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