Documentation Center

Adding Regions to your Dreamweaver Page Design Template

Add markup for Regions to the Template Building Block that is your Dreamweaver Template for Page Design, for example, Default Dreamweaver Page Design.

Before you begin

The Template Building Blocks that you modify for this task must be in a Template in which they are preceded by an Extract Components from Regions default Template Building Block.

Procedure

  1. In Adobe Dreamweaver, open a Dreamweaver Template used for Page Design.
  2. In the Dreamweaver Template, identify those parts of your HTML that denote a Region. Enclose such a fragment within a <div>. Within the <div>, directly below the opening tag, add the following markup:
    <!-- Start Region: {path: "REGIONPATH"} -->

    where REGIONPATH is the path to this specific region, written as a sequence of Region names separated by a backslash. For example, if your Page Schema defines a top-level Region called Sidebar, which itself contains a Region called SupportLinks, a REGIONPATH called Sidebar\SupportLinks would identify the latter Region.

    The HTML for the Sidebar Region and its SupportLinks sub-Region could look as follows:
    <div>
      <!-- Start Region: {path: "Sidebar"} -->
      <h2>Sidebar</h2>
      <h3>Sidebar items</h3>
      <!-- TemplateBeginRepeat name="Sidebar" -->
        <div>@@RenderComponentPresentation()@@</div>
      <!-- TemplateEndRepeat -->
    
      <div>
        <!-- Start Region: {path: "Sidebar\SupportLinks"} -->
        <h3>Support links</h3>
        <!-- TemplateBeginRepeat name="Sidebar\SupportLinks" -->
          <div>@@RenderComponentPresentation()@@</div>
        <!-- TemplateEndRepeat -->
      </div>
    </div>
  3. Save and close your Dreamweaver Template.
  4. Repeat these steps for each of your Page Designs.

What to do next

With the Regions defined in your Dreamweaver Template, the Regions are now visible in Experience Manager, and Component Presentations can be dragged and dropped into them. But without further action, the Regions are unconstrained, allowing unlimited numbers of Component Presentations, based on any Schema and rendered with any Component Template.

To enforce the actual restrictions you placed on your Regions, you must also include the Enable Inline Editing Template Building Block in your Page Template, and place it after the Template Building Block that contains this Dreamweaver Template. Doing so causes the Start Region markup tag to be updated, so that in the actual webpage, it looks, for example, like this:
<!--  Start Region: {title: "SupportLinks", path: "Sidebar\\SupportLinks", allowedComponentTypes: [{schema: "tcm:13-846-8", template: "tcm:13-899-32"}], minOccurs: 0, maxOccurs: 6} -->

This updated markup specifies that there can be at most 6 Component Presentations in the Region, that their Components must be based on one specific Schema only, and that they must have been rendered with one specific Component Template only.