Search code examples
sitecoresitecore6page-editor

Sitecore: Programmatically remove the Page Editor Tool bar on top


I am loading a page (item rendering e.g. /sitecore/content/.../Page) inside an IFrame. It shows the Page Editor ribbon as well. I want to hide that tool bar, it is not required in my scenario.

But if I set the source URL for IFrame like http://mysite/somefolder/page.aspx it does not display the Page Editor controls.

That means Page Editor controls gets loaded on demand. Need to know how to stop loading Page Editor controls on the page. Please let me know if you know how to stop those controls being loaded to the page.


Solution

  • I found a solution, I am hiding this ribbon with CSS, it's a very simple solution,

    <style>
        /*Hide the edit mode ribbon panel appears in the iframes. Originally added this to Price strategy control.*/
        #scWebEditRibbon, #scCrossPiece
        {
            display: none;
        }
    </style>