I'm trying to embed a Google Calendar to my site but the HTML Editor keeps stripping out the <iframe>. I saw some old posts in the archives about this, but don't have a clue what I'm doing with the TinyMCE. Also, Double-A-Ron has an archive about creating a new page type (CalendarPage) and inserting this code in the "class CalendarPage_Controller extends Page_Controller" section of CalendarPage.php:
public function getGCalHTML()
$html = '<iframe src="http://www.google.com/calendar/embed?showCalendars=0&height=600&wkst=1&bgcolor=%233366ff&src=orphanhope%40gmail.com&color=%232952A3&ctz=Africa%2FJohannesburg" style=" border:solid 1px #777 " width="800" height="600" frameborder="0" scrolling="no"></iframe>'
But when I do this, I get a parse error for that last line that says "return $html;"
I've had the some issue, with iframes and onClicks. Silverstripe is being to cleaver and brutally pulling these out. Kind of forces the admin to think of a more compliant way to implement these things.
you're missing a closing semi-colon at the the end of the $html variable, It worked a treat after that.