SiteEdit 2009 Essentials - Blueprint Contexts

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 .

Blueprint Contexts

With SiteEdit, if the component or page is not created in the same publication as that which the page is published from, then you will notice that the Page and Component are read-only, this is because by default SiteEdit shows them in the context of the publication you publish from. You can make the component editable by click the Edit in Parent publication button on the Component Toolbar, or clicking the Localize button to localize it and edit it.

However, this is not so convenient for Editors, and often you do not want to localize the Component in the publish publication, but further up in the Translation layer of the Blueprint. A way round these issues is presented in this article.

Introduction to Blueprint Contexts

The Enable SiteEdit 2009 TBB has parameters which enable you to change the default contexts for the Page and Component:

  • BluePrintingComponentContext -the context publication in which a component should be edited or localized

  • BluePrintingPageContext - the context publication in which a page should be edited or localized

  • BluePrintingPublishContext - the context publication in which a page should be (re)published

As mentioned above, if these are not specified, they all default to the publication from which a page is published. If your page and/or component are not created in the same publication as they are published from, this results in the Page being read only (if you select PageàOpen Page from the toolbar) and the Components being read-only (having a light grey border with a padlock symbol).

Dynamically setting the contexts

The SiteEdit Prepare TBB contains logic to set these parameters to suitable values:

  1. BluePrintingPageContext -this is set to the publication where the page has been created.
  2. BluePrintingPublishContext - this is set to the publication from which the page is published.
  3. BluePrintingComponentContext - this is set according to the logic outlined below

Point 1 means that you can no longer localize the page through SiteEdit. However localization of pages is not usually required or recommended and opening a page to edit its metadata or components is a much more common action, so should be enabled. If it is required to localize a page then this should be done through the Standard CMS GUI.

The logic for point 3 is as follows:

  • Check the immediate parent publications in the blueprint from the publication from which we are publishing
  • If there is no parent, or only one parent, set the BluePrintingComponentContext to be the publication in which the Component is created
  • If there are two or more parents, sort them by name (ascending)
  • Use the first one as the BluePrintingComponentContext…
  • …unless the component itself does not exist in this publication in which case use the publication in which we are publishing from as the BluePrintingComponentContext.

In step C  we assume that publications are named in such a way that the name indicates the level in the blueprint (eg 01 Schemas, 02c Content, 03 Translation German, 03 Translation French, 04 Website Master, 05 www.site.com, 06 www.site.com/fr etc.)

 In step E we checked if the component exists in this highest parent, by comparing the names of this publication with that of the publication the component is created in to see which is alphabetically greater (which again assumes a naming convention as mentioned above).

Some examples to illustrate

The above is best illustrated with an example of a few scenarios to see where we will get the component editable.

Supposing we have the following blueprint

Scenario 1: Component X created in 02 Content, Page Y published from 05 Website 1. 05 Website 1 only has a single parent, so 02 Content is the BlueprintComponentContext.

Scenario 2: Component X created in 02 Content, Page Y published from 06 Website 1 (FR). 06 Website 1 (FR) has 2 parents, of which 03 Translation (FR) is the lowest alphabetically (thus the highest in the BP), and X is in this publication, so 03 Translation (FR) is the BlueprintComponentContext.

Scenario 3: Component X created in 05 Website 1, Page Y published from 05 Website 1. 05 Website 1 only has a single parent, so 05 Website 1 is the BlueprintComponentContext.

Scenario 4: Component X created in 05 Website 1, Page Y published from 06 Website 1 (FR). 06 Website 1 (FR) has 2 parents, of which 03 Translation (FR) is the lowest alphabetically (thus the highest in the BP), but X is not in this publication, so 06 Website 1 (FR) is the BlueprintComponentContext.

All of the above scenarios ensure the component is edited or localized in the appropriate level in the Blueprint. This will cover 95% of editing scenarios, but it is always possible that components need to be localized at other levels, in which case localization should be done through the Standard CMS GUI.

NOTE: The above logic may not work in all blueprinting scenarios so may have to be adapted to your specific needs.

NOTE: BlueprintingComponentContext is a page-wide setting, so this may not work if you have multiple components on the page which come from different publications, or should be localized in different publications.

Outcome and next steps

You now have modified the Blueprinting contexts to make SiteEdit more usable in most common editorial scenarios when using a standard 'diamond' blueprint with a translation layer and editing existing content published to the website.

SiteEdit offers some features for the creation of new content, which should not be overlooked. The next section describes two of these.