Adding an IFrame to a SharePoint Wiki Page

While integrating the Windows Installer XML 3.0 toolset, we needed to add references to the WiX manual on our SharePoint Wiki site.  The straightforward path would have been to add an <iFrame src="<URL path to WiX manual page>" />.  Unfortunately the wiki page content swallows any IFrame elements. 

After poking around for a while, I found the following works for adding an IFrame to a SharePoint Wiki topic

  1. Create new page using your favorite SharePoint Wiki method

  2. View the new page in explorer

    1. Navigate to the list view of the wiki pages <site root>/wiki/Pages/Forms/AllPages.aspx

    2. In the View dropdown, select Explorer View

  3. In the Explore view, right click on the page you just created and choose edit (FWIW: I'm using notepad)

  4. Find the element containing ContentPlaceHolderId="PlaceHolderMain"

  5. Just after the element found in step 4 add the start of a table (like so)

  6. <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
    <table width=100%>

  7. Find the subsequent element <WebPartPages:WebPartZone

  8. Just before the element found in step 6 add the IFrame and the end of the table (like so)

  9. </td></tr>
    <iframe src="" width=100% height=1000>
     <WebPartPages:WebPartZone runat="server" FrameType="None" ID="Bottom" Title="loc:Bottom" />

  10. Save the file and close your editor.

  11. Refresh the Wiki page in your browser and you have a IFrame inside your wiki page
A cool thing about this technique is that when a subsequent user edits the wiki page (using the usual SharePoint methods) the are unable to edit the content (from the other site) that you just IFramed into the page.

Comments (0)

Skip to main content