We are using Razor Mediator 5.3 templating engine with Tridion 2011 SP1 edition and host an ASP .NET 4.0 application. Now, we are trying to integrate UI2012 with the application. I need some suggestions and best practices from past implementations.
 
**Current State (without UI2012 integration)**

 1. A Razor Page Template for the Page
 2. A site master page

**Integration with UI2012/Experience Manager** 

 1. Setup a UI2012 placeholder in the Master sitemap with an ID UI2012Content

 2. I have created a new compound RPT with the following source - RPT_UI2012

 - RPT UI2012 Start TBB - Source:
       `<asp:Content ID="UI2012ID" ContentPlaceHolderID="UI2012Content" Runat="Server"/>`

 - Enable inline edit for a page with parameter reference as per [the
   documentation][1]. - Source
   `<!-- Page Settings: {"PageID":"tcm:xx-xxxxx-xx","PageModified":"TIMESTAMP","PageTemplateID":"tcm:xx-xxxxx-xxx","PageTemplateModified":"TIMESTAMP"} -->
<script type="text/javascript" language="javascript" defer="defer" src="http://<MYCMEURL>/WebUI/Editors/SiteEdit/Views/Bootstrap/Bootstrap.aspx?mode=js" id="tridion.siteedit"></script>`

 - RPT UI2012 End TBB - Source: 
    `</asp:Content>Blah.. Other Razor Code</asp:Content>`

The overall Page Template includes the existing Razor Page Template (from current state above)  and the above RPT_UI2012 compound Template (from the integration code above).
 
**Question:**
Should I just render the package with the current state and add the above compound Template to it with package inclusion? Are there any best practices around implementation with UI2012?

I also see that there is an open [enhancement request][2] in the Razor Mediator forum as well which encourages the implementation with the relevant TCDL.

**UPDATE**
I have added "Enable inline edit for Content" to the Razor Component Template and used the component presentation in a DWT Page Template with "Enable inline edit for Page" enabled and I am able to open the Page using UI2012. I am still unable to edit the content inline in the UI but only able to modify it using Forms View. I am using the following code for rendering the component presentation currently

`<!-- Inner Content Starts Here -->
@foreach (var cp in ComponentPresentations) {
    @cp.RenderComponentPresentation()
}
<!-- Inner Content Ends Here -->`

Should I use the following built in functions as suggested in the Razor Mediator guide?

`String RenderComponentField(string fieldExpression, int fieldIndex)
String RenderComponentField(string fieldExpression, int fieldIndex, bool renderTcdlTagOnError)
String RenderComponentField(string fieldExpression, int fieldIndex, string value)
String RenderComponentField(string fieldExpression, int fieldIndex, string value, bool renderTcdlTagOnError)
String RenderComponentField(string fieldExpression, int fieldIndex, bool htmlEncodeResult, bool resolveHtmlAsRTFContent)
String RenderComponentField(string fieldExpression, int fieldIndex, bool htmlEncodeResult, bool resolveHtmlAsRTFContent, renderTcdlTagOnError)`


Please note that I am logging in as administrator to rule out any issues associated with tridion security.

Thanks for your time and suggestions!


  [1]: http://www.tridiondeveloper.com/sdl-tridion-ui-template-building-block-set-up-for-easier-content-porting
  [2]: https://code.google.com/p/razor-mediator-4-tridion/issues/detail?id=8