Anyway I’ve put the contact form in my index.html file and I’m having the same problem. I’ve passed $contact in via actionIndex() in SiteController but it’s still complaining that contact is undefined. Surely this should work.
I don’t think your view is rendered in the same context as the rest of the layout, so that won’t work. Learn to make a widget (check the MainMenu widget in the base layout of a newly generated webapp and/or checkout this cookbook article to get started) and make a widget, it’s the right way to do this.