Hi,
I'm trying to convert a site I built in CI to Fuel, and things going reasonably well.
Built my homepage, but encountered a problem when trying to add an 'about' page using admin. I get the parse error, which from viewing the forum, I beleive may be something to do with dwoo templating? So I created a view page for 'about' - really simple, two lines of html, header tags and P tags.
I then imported this view in admin following the instructions here:
http://www.getfuelcms.com/blog/id/6I still get the parsing error however:
Compilation error at line 41 in "string:" : Parse error in "id:'menu', active:'menuhover', speed:'5'});
The trouble seems to be focused around this area in my header:
var dropdown=new TINY.dropdown.init("dropdown", {id:'menu', active:'menuhover', speed:'5'});
(NB- I tried to post the script tags and the conditional IE tags that encase this fragment, but don't know how on this forum, if someone could let me know, would be appreciated, thanks).
As you can see, it is having trouble around some javascript that I am trying to import. Works fine on my homepage, but kills everything on my about page.
Some more details - My home page uses no controllers. Calls in three blocks - header, right and footer. Header and Right both contain javascript, Right contains some AJAX
About page - uses a main layout that calls in the same blocks as the main. But as stated above, breaks with a parse error.
I have tried removing the offending script from header, but then I get an error telling me I haven't closed some blocks properly.
Bit stuck on this one, so hope someone can help.
If you need code fragments uploaded, let me know which ones, don't want to intially just dump everything!
Cheers.
Comments
Googled around Dwoo, and found that as Dwoo uses "{" to open it's templating code, I needed to replace all "{" with "{ " - note the space after the opening bracket. This causes Dwoo to ignore what follows in that bracket. Required really if including javascript in your views.
Hopefully useful for someone else too.
Cheers,
Tallowman