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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Embed an iframe into a page


Go to End


5 Posts   2381 Views

Avatar
Bertjan

Community Member, 4 Posts

28 January 2011 at 11:14pm

Hi!

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:
http://blogs.informedia.in/cms/iframe-silverstripe-html-editor

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

And I followed the (old) topics like:
http://www.silverstripe.org/archive/show/2607 (3 years old)
But not working for version 2.4.4.

I'm using Silverstripe version v2.4.4.

Please help! :)

Thanks - Bertjan

Avatar
swaiba

Forum Moderator, 1899 Posts

29 January 2011 at 12:36am

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.

Avatar
Bertjan

Community Member, 4 Posts

3 February 2011 at 1:24am

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 HomePage.ss.
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?

Thanks

Avatar
swaiba

Forum Moderator, 1899 Posts

3 February 2011 at 1:26am

Edited: 03/02/2011 1:27am

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

Avatar
Bertjan

Community Member, 4 Posts

1 April 2011 at 8:25pm

Sorry for my late reply.

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

Thanks - Bertjan