You are here: Home / Documentation / How To's / Yet another How To on embedding video on your page

Yet another How To on embedding video on your page

by nguyen — published Sep 03, 2009 01:05 PM, last modified Aug 16, 2016 10:50 AM
or any arbitrary HTML, JavaScript, etc.

Your options for embedding video on a page include the following

  1. Use our uwosh.flash product.  It's available from our egg basket.
  2. Create a static text portlet and paste arbitrary HTML and JavaScript into the body.
  3. If you need to embed the video into the body of a page, adjust the HTML Filtering settings in the Site Setup so that Plone doesn't strip out the new HTML and JavaScript.  This is going to adversely affect the security of your entire site, however, so we do not recommend using this method.
  4. Create a custom view template for a Document ("Page"), then use the Display drop down menu to select the new custom view template.  This is the method we will describe here.

Creating a Custom View Template

  • In the ZMI, go to portal_skins. Click the Find tab. Search for "document_view". Click on the link.  Click on the Customize button. This takes you to a new copy of document_view in the portal_skins/custom folder.
  • Click the link to the "custom" folder so you can see everything that is in the portal_skins/custom folder. Check the box next to document_view, press Rename, specify a new name (eg. embedded_video_view), press Save.
  • Click on embedded_video_view, and in the body of the template paste the HTML and JavaScript you want anywhere inside the "main" slot.  For example, paste it just after the section "abovecontentbody", so that the video will appear somewhere between the description of the page and the body of the page. 
  • You may have to clean up HTML so that the <param> tags don't have any </param> end tags; instead, delete the </param> end tags and close the <param> tag with "/>".
  • Press Save.
  • In the ZMI, go to portal_types, then click Document.  For the property "Available view methods" add a line containing
    .  Press Save Changes.
  • Now in the non-ZMI view of your site, navigate to the page on which you want the video to show up.  (Alternatively, navigate to where you want to add a new page and add a new page).
  • Click the Display drop down menu and choose "embedded_video_view".  Your video should now show up on the page (make sure your browser has plugins and scripts enabled).