[SalesForce] Use standard layouts in visualforce edit pages

Does anyone know if it is possible to embed in edit mode a standard page layout in a visualforce page (in edit mode)?

I've also tried the opposite, embed a visualforce page into an standard page layout, but it does not show de VF while editing, just in view mode.

Thanks in advance

Best Answer

As an alternative to using standard page layouts, you can use FieldSets. You can create several field sets and have your controller fetch the correct one with similar criteria as the page layouts. You can then use the field set to dynamically render your page. Basically, you will use an <apex:repeat> paired with <apex:pageBlockSecions> in order to simulate a Page Layout. (Not quite the same thing, but the closest I've found so far.)