Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS

Embed an iframe into a page


5 Posts   1448 Views


28 January 2011 at 11:14pm Community Member, 4 Posts


I'm trying to embed an iframe into a webpage using the WYSIWYG editor but the <iframe> code is being stripped out.

I've tried:

Then I get the error:
Parse error: syntax error, unexpected '[' in /mysite/_config.php on line 28

And I followed the (old) topics like: (3 years old)
But not working for version 2.4.4.

I'm using Silverstripe version v2.4.4.

Please help! :)

Thanks - Bertjan


29 January 2011 at 12:36am Forum Moderator, 1796 Posts

I am not sure you can - it is designed to enforce standards and remove things like iframes and JavaScript I think. If you want to absolutely control the HTML that arrives on the page you'll need to place in within the related template.


3 February 2011 at 1:24am Community Member, 4 Posts

Thanks for your reply!

I've tried the tutorial 1 - Building a Basic Site part 'using a different template for the home page'.

I created a new file HomePage.php and a new template
Then the dev/build procedure and the admin page let me see the error: error at line 16 of HomePage.php.
Warning: Unexpected character in input: ' in /mysite/code/HomePage.php on line 16

After adding a php close tag to HomePage.php this error was resolved.
But this is not the solution I think.

In the admin area I can change the page type to Home page and click create.
Then I receive a javascript error...

So, what's going wrong?



3 February 2011 at 1:26am (Last edited: 3 February 2011 1:27am), Forum Moderator, 1796 Posts

No idea without seeing the code or the exact javascript error! ;-)


1 April 2011 at 8:25pm Community Member, 4 Posts

Sorry for my late reply.

I've followed the tutorial again and now it's working!

Thanks - Bertjan