SiteEdit 2009 SP3 prepare BluePrinting parameters TBB

You might have noticed the last three template parameters on the Enable SiteEdit 2009 TBB provided with SiteEdit 2009, which are related to BluePrinting:

SE 2009 BluePrint parameters

These parameters are interesting but being set at the template level, their value is fixed for all pages using a given Page Template. Thanks to the existence of the Package, we can easily create a .Net TBB which will prepare these values for the current page being published, and push them to the Package. This way, by letting the template parameters empty as shown above, the Enable SiteEdit 2009 TBB will read the variables directly from the Package.

This is useful when using BluePrinting, because if we publish a shared Page (which was created at a higher level in the BluePrint), the editors won't be able to modify it, unless the "Override Page Publication" (BluePrintingPageContext) is defined with the ID of the Publication owning the Page.

BluePrintThe SiteEdit Prepare Parameters TBB attached to this article pushes to the package the correct values for the:

  • BluePrintingPageContext
  • BluePrintingComponentContext
  • BluePrintingPublishContext

On the right is an example of a BluePrint hierarchy where this TBB is useful.

Please create a Parameters Schema with the following text fields in it:

  • translationContentPublicationPattern
  • globalContentPublicationPattern

Assign this parameters Schema to the SiteEdit Prepare Parameters TBB. This code is used to define the �BluePrintingComponentContext� parameter, so that editors can directly edit component fields inline, even though the Components on the page were created in a higher Publication. It also defines the �BluePrintingPageContext� using the Uri of the page�s context repository.

Usage

Open the SiteEdit Prepare solution in Visual Studio. Compile and upload the assembly to SDL Tridion.

Place the �SiteEdit Prepare Parameters� TBB before the �Enable SiteEdit 2009� TBB in your compound Page Template:

2011 template builder

Creating the BluePrint context variable in the package results in the following output from the �Enable SiteEdit 2009� TBB:

<!-- SiteEdit Settings: { "PageID" : "tcm:27-2788-64", "PageVersion" : 45, "TargetTypeID" : "tcm:0-1-65538", "ComponentPresentationLocation" : 1, "BluePrinting" : { "PageContext" : "tcm:0-10-1", "ComponentContext" : "tcm:0-11-1", "PublishContext" : "tcm:0-19-1"}} -->

In the example shown in the previous image, we are publishing a page from a local french website at a deep level in the BluePrint hierarchy (Publication id 19), but the Component Context publication determined by the SiteEdit Prepare Parameters TBB is at the level 06 (Publication title �06 French Content�, ID �tcm:0-11-1�).

The source code can be downloaded below, so that you can change it if necessary. This TBB was used with SiteEdit 2009 SP3 and SDL Tridion 2011. It should be properly tested before being used on a Production environment.


Developer
Company
License agreement
Tags
:    SiteEdit,  2009 SP3,  prepare,  BluePrint,  2011,  TBB
Version
:   1.1
Source
:   Yes

About the Author
Philippe Conil
Sales Engineer

Philippe Conil is part of the North America's presales team, helping customers to make the most of our products. Philippe joined SDL Tridion in 2008, and as a certified Technical Consultant has been involved in numerous customers' projects in both Europe and the US.

SDL CMT division

Most Popular Building Blocks

These are the most popular Building Blocks. Did you already get them?