SDL Tridion UI – Template Building Block set up for easier content porting

If you’re following the SDL Tridion guidelines for implementing the new UI within your compound page templates (Link – Note log-in required) you’ll notice that you need to specify the URL of your CME enviroment.  As this value is required on each page template that will utilize UI functionality, this could be a bit of a pain to manage once you migrate your templates between different environments (Development, QA, Production etc).  It doesn’t need to be, here is a simple solution to make content porting and migration easier to work with.

The instructions from SDL’s docs are:

  1. Start the Template Builder client application and open the Page Template you use to create Web pages that you now want to enable editing for. Template Builder shows the Building Blocks of this Page Template.
  2. In the Building Blocks view, find the Template Building Block called Enable inline editing for Page and drag it directly under the Dreamweaver Template Building Block of the Template, or, if you do not use a Dreamweaver Template Building Block, directly under the Template Building Block that produces a package item called Output.
  3. Select Enable inline editing for Page and in the list of properties on the right, select SiteEdit Editor URL and set it to the the value http://<cme-hostname>/WebUI/Editors/SiteEdit/, where <cme-hostname> is the host name of the Content Manager Explorer Web site with the User Interface installed.

My recommendation is to create a new Component Template building block, which contains just the SDL building block ‘Enable inline editing for Page‘ (point 2 above) along with the SiteEdit Editor URL value (point 3 above).  Let’s walk through this process in detail.

Create a new Compound Template Building Block

Using the Template Builder, create a new Template Building Block.   I’ve named mine ‘Configured inline editing for Page‘ and stored it in the Default Templates folder at the highest publication level.

SDL Tridion UI - Create compound template

Insert the SDL Tridion building block into our new TBB

Now drag and drop the SDL Enable inline editing for Page template building block onto TBB and specify the correct URL of your SDL Tridion environment as shown in the image below:SDL Tridion UI add UI Page TBB

Great, now save and close this, we’ve done everything we need to do here.

Use our new TBB on component page templates

Now where instructed to add the default SDL building block (see point one from the SDL docs above), we can simply drop our new TBB onto the page as shown below:

Now simply ensure you add this TBB to your pages and the SiteEdit/UI editor URL is neatly stored in a single location, making the migration of your templates a little bit easier to manage.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>