justjohn/twig.js — Issue #1: url() doesn't seem working
Author: minixxie
Created: 2011-12-14 06:53:28+00:00
State: open

Hi Author,

I'm using twig.js into my symfony2 framework.
With non-AJAX request, my TWIG templates render successfully and being shown in my browser correctly.

Now I'm trying to use twig.js so that the AJAX part (the javascript code) and the PHP code share the same TWIG template. (As we know code sharing is very important for code maintenance).

In my template file, it contains some call to url() function, which uses a route identifier to re-construct the URL. But twig seems to be broken on this:

Error: uncaught exception: TwigException: Twig.expression.type.expression cannot follow a Twig.expression.type.variable at template:3 near '('_kuulabu_home_page...' OR Twig.expression.type.parameter.start cannot follow a Twig.expression.type.variable at template:3 near '(...'

(where _kuulabu_home_page is a route identifier)

Do you have any idea to help me solve the problem? Many thanks.

Simon