happyninjas/lex — Issue #4: Callbacks inside conditionals
Author: jerel
Created: 2011-11-11 00:59:32+00:00
State: open

I'm having fits with some conditionals and I'm about to conclude that it's a bug. Here's an example:
The issue here is with the {url:segments segment="1"} callback. It throws an error about "unexpected T_IS_EQUAL"
`	{{ if {url:segments segment="1"} == 'portfolio' }}

{{ template:body }}

{{ else }}

{{ template:body }}

{{ theme:partial name="sidebar" }}
{{ endif }} `

I've debugged about all I can and I'm still coming up short. If I remove the callback everything goes on. The url plugin doesn't seem to be returning a bad value as I've even output text directly from it and Lex still errors out.

One more thing: In upgrading these sites I've found that it is extremely difficult to find where a tag has gone bad during the upgrade. Would there be any way that Lex could log a snippet of text surrounding the bad tag? Anything to give a clue on its whereabouts.