We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How to load CP publish form outside of CP?

Development and Programming

Graham Huber's avatar
Graham Huber
217 posts
15 years ago
Graham Huber's avatar Graham Huber

So, until SAEF gets its makeover, I’m trying to figure out how to perserve the power of custom fieldtypes publishing for users outside of the CP.

My basic idea is to load the CP Publish Form outside of the CP…

At first I thought the Publish Form could be loaded via an AJAX load() call, but then I realized that the CP loads all kinds of scripts and stylesheets that need to be there for the CP to function right.

So, what about loading the whole CP in an iFrame, then externally applying a stylesheet to it that sets display:none to everything except the Publish Form?

I managed to reset the CSS to hide everything except the publish form:

<style type="text/css" >

#mainMenu, #sideBar, #breadCrumb, #accessoriesDiv, #footer, .publishheading, #notice_container, #tools, #showToolbarLink  {
    display:none;
} 

html, body, #mainWrapper {
    background:none;
} 

#mainContent .contents, #mainContent, #mainWrapper, body, #holder {
    padding: 0px;
    margin: 0px;
}

#mainContent {
    width: auto;
}
</style>

I did this on a static copy of the CP source… Have yet to try it on a live version, but I think it might work?

CSS could further be restyled to match the style of the site.

One advantage to this method is actually that in the event the CP Publish Form was ever changed, the changes would basically reflect in the site without having to edit a SAEF to match the revisions.

Am I crazy, or is this a viable method??

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.