SiteEdit 2009 Essentials - Dynamic Component Presentations

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.

SiteEdit 2009 Essentials

Article Sections

The Template Building Blocks mentioned in this article can be downloaded here .

Dynamic Component Presentations

If certain areas of the site present Components dynamically, rather than having them explicitly added to the page, then some additional work is required to enable SiteEdit for this 'dynamic' content.

Updating your Dynamic Component Templates

The problem is that the tcdl:ComponentPresentation tag (and thus the SiteEdit CP JSON object) is written out by the Page Template, which is not invoked when publishing a DCP.

This is done as follows in your Component Template:

This is done as follows in your Component Template:

  1. Add the SiteEdit Process DCP Output TBB after the DWT TBB - this this encloses the output in the correct tcdl:ComponentPresentation syntax and pushes the template id into the package for processing in SiteEdit Process Special CPs
  2. Add the Enable SiteEdit 2009 TBB immediately after the previous TBB - this converts the tcdl:ComponentPresentation into the SiteEdit JSON syntax
  3. Add the SiteEdit Process Special CPs TBB right at the end - this ensures that the CP is marked with IsQueryBased : true to prevent SiteEdit showing the red border.

Outcome and next steps

You are now able to publish and edit dynamic component presentations using SiteEdit.

Depending on your content model, you may still have some issues editing components with SiteEdit on your website. The next 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).