So you have installed SiteEdit 2009.... what's next? This article contains details on how the basics of SiteEdit 2009 can be implemented in your templates, and then moves on to address additional features such as controlling the publication in which components and pages are edited, making embedded or linked components editable through SiteEdit, and enabling the editing and creation of components that are published as Dynamic Component Presentations. The whole article refers to functionality provided by SiteEdit 2009 SP2. Earlier versions will not necessarily work with the described approaches. The TT72267 hotfix is also required.
The Template Building Blocks mentioned in this article can be downloaded here .
Depending on your content model, you may have some issues editing components with SiteEdit on your website. This section outlines steps to take if you have component templates that render embedded component presentations (for example if your main component has a component link field, and you render the linked component within your main Component Template).
Often a schema field will link to another component, and in your component template rather than just rendering a link to this component, you want to render some of the field values. This can be done by calling RenderComponentPresentation on the linked component from within your Component Template Dreamweaver Layout.
When you publish such a page with the standard SiteEdit 2009 TBBs, there are some problems:
The first problem can be solved by adding the SiteEdit Enclose CP Output with span and JSON TBB just after the DWT in your Main Component Template. This TBB simply adds the enclosing JSON and span tag to the outer CP that is missed by the Enable SiteEdit 2009 TBB.
The second problem can be resolved with the following steps. Essentially we mark the embedded CP as being query based so SiteEdit does not complain:
If you render the linked component fields directly, rather than using RenderComponentPresentation, you can use the above method, but you will need to make sure you manually add tcdl:ComponentPresentation syntax around the embedded fields, using a dummy Component Template Uri. If you want the fields to be editable you will need to add tcdl syntax around each field, as RenderComponentField will not work (as it operates on the main component, not the linked one)