Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Embed an iframe into a page

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

Page: 1
Go to End
Author Topic: 1432 Views
  • Bertjan
    Avatar
    Community Member
    4 Posts

    Embed an iframe into a page Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: Embed an iframe into a page Link to this post

    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.

  • Bertjan
    Avatar
    Community Member
    4 Posts

    Re: Embed an iframe into a page Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: Embed an iframe into a page Link to this post

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

  • Bertjan
    Avatar
    Community Member
    4 Posts

    Re: Embed an iframe into a page Link to this post

    Sorry for my late reply.

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

    Thanks - Bertjan

    1432 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.