Create a document from the template in which you want to base the nested template. Do one of the following:
- Dreamweaver User Guide
- Introduction
- Dreamweaver and Creative Cloud
- Dreamweaver workspaces and views
- Set up sites
- About Dreamweaver sites
- Set up a local version of your site
- Connect to a publishing server
- Set up a testing server
- Import and export Dreamweaver site settings
- Bring existing websites from a remote server to your local site root
- Accessibility features in Dreamweaver
- Advanced settings
- Set site preferences for transferring files
- Specify proxy server settings in Dreamweaver
- Synchronize Dreamweaver settings with Creative Cloud
- Using Git in Dreamweaver
- Manage files
- Create and open files
- Manage files and folders
- Getting and putting files to and from your server
- Check in and check out files
- Synchronize files
- Compare files for differences
- Cloak files and folders in your Dreamweaver site
- Enable Design Notes for Dreamweaver sites
- Preventing potential Gatekeeper exploit
- Layout and design
- CSS
- Understand Cascading Style Sheets
- Laying out pages using CSS Designer
- Using CSS preprocessors in Dreamweaver
- How to set CSS Style preferences in Dreamweaver
- Move CSS rules in Dreamweaver
- Convert inline CSS to a CSS rule in Dreamweaver
- Work with div tags
- Apply gradients to background
- Create and edit CSS3 transition effects in Dreamweaver
- Format code
- Page content and assets
- Set page properties
- Set CSS heading properties and CSS link properties
- Work with text
- Find and replace text, tags, and attributes
- DOM panel
- Edit in Live View
- Encoding documents in Dreamweaver
- Select and view elements in the Document window
- Set text properties in the Property inspector
- Spell check a web page
- Using horizontal rules in Dreamweaver
- Add and modify font combinations in Dreamweaver
- Work with assets
- Insert and update dates in Dreamweaver
- Create and manage favorite assets in Dreamweaver
- Insert and edit images in Dreamweaver
- Add media objects
- Adding videos in Dreamweaver
- Insert HTML5 video
- Insert SWF files
- Add audio effects
- Insert HTML5 audio in Dreamweaver
- Work with library items
- Using Arabic and Hebrew text in Dreamweaver
- Linking and navigation
- jQuery widgets and effects
- Coding websites
- About coding in Dreamweaver
- Coding environment in Dreamweaver
- Set coding preferences
- Customize code coloring
- Write and edit code
- Code hinting and code completion
- Collapse and expand code
- Reuse code with snippets
- Lint code
- Optimize code
- Edit code in Design view
- Work with head content for pages
- Insert server-side includes in Dreamweaver
- Using tag libraries in Dreamweaver
- Importing custom tags into Dreamweaver
- Use JavaScript behaviors (general instructions)
- Apply built-in JavaScript behaviors
- About XML and XSLT
- Perform server-side XSL transformations in Dreamweaver
- Performing client-side XSL transformations in Dreamweaver
- Add character entities for XSLT in Dreamweaver
- Format code
- Cross-product workflows
- Installing and using extensions to Dreamweaver
- In-App updates in Dreamweaver
- Insert Microsoft Office documents in Dreamweaver (Windows only)
- Working with Fireworks and Dreamweaver
- Edit content in Dreamweaver sites using Contribute
- Dreamweaver-Business Catalyst integration
- Create personalized email campaigns
- Templates
- About Dreamweaver templates
- Recognizing templates and template-based documents
- Create a Dreamweaver template
- Create editable regions in templates
- Create repeating regions and tables in Dreamweaver
- Use optional regions in templates
- Define editable tag attributes in Dreamweaver
- How to create nested templates in Dreamweaver
- Edit, update, and delete templates
- Export and import xml content in Dreamweaver
- Apply or remove a template from an existing document
- Edit content in Dreamweaver templates
- Syntax rules for template tags in Dreamweaver
- Set highlighting preferences for template regions
- Benefits of using templates in Dreamweaver
- Mobile and multiscreen
- Dynamic sites, pages and web forms
- Understand web applications
- Set up your computer for application development
- Troubleshoot database connections
- Removing connection scripts in Dreamweaver
- Design dynamic pages
- Dynamic content sources overview
- Define sources of dynamic content
- Add dynamic content to pages
- Changing dynamic content in Dreamweaver
- Display database records
- Provide and troubleshoot live data in Dreamweaver
- Add custom server behaviors in Dreamweaver
- Building forms using Dreamweaver
- Use forms to collect information from users
- Create and enable ColdFusion forms in Dreamweaver
- Create web forms
- Enhanced HTML5 support for form elements
- Develop a form using Dreamweaver
- Building applications visually
- Build master and detail pages in Dreamweaver
- Build search and results pages
- Build a record insert page
- Build an update record page in Dreamweaver
- Building record delete pages in Dreamweaver
- Use ASP commands to modify database in Dreamweaver
- Build a registration page
- Build a login page
- Build a page that only authorized users can access
- Securing folders in Coldfusion using Dreamweaver
- Using ColdFusion components in Dreamweaver
- Test, preview, and publish websites
- Troubleshooting
Learn how to create nested templates to control content in pages that share design elements in Dreamweaver.
A nested template is a template whose design and editable regions are based on another template. Nested templates are useful for controlling content in pages of a site that share many design elements, but have a few variations between pages. For example, a base template might contain broader design areas and be usable by many content contributors for a site, while a nested template might further define the editable regions in pages for a specific section in a site.
Editable regions in a base template are passed through to the nested template, and remain editable in pages created from a nested template unless new template regions are inserted in these regions.
Changes to a base template are automatically updated in templates based on the base template, and in all template-based documents that are based on the main and nested templates.
In the following example, the template trioHome contains three editable regions, named Body, NavBar, and Footer:
To create a nested template, a new document based on the template was created and then saved as a template and named TrioNested. In the nested template, two editable regions have been added in the editable region named Body.
When you add a new editable region in an editable region passed through to the nested template, the highlighting color of the editable region changes to orange. Content you add outside the editable region, such as the graphic in the editableColumn, is no longer editable in documents based on the nested template. The blue highlighted editable areas, whether added in the nested template or passed through from the base template, remain editable in documents that are based on the nested template. Template regions that do not contain an editable region pass through to template‑based documents as editable regions.
Create a nested template
Nested templates let you create variations of a base template. You can nest multiple templates to define increasingly specific layouts.
By default, all editable template regions from the base template pass through the nested template to the document based on the nested template. That means that if you create an editable region in a base template, then create a nested template, the editable region appears in documents based on the nested template (if you did not insert any new template regions in that region in the nested template).
You can insert template markup inside an editable region so that it won’t pass through as an editable region in documents based on the nested template. Such regions have an orange border instead of a blue border.
-
From the Assets panel, click Templates from the left pane. Select New Template from the bottom pane.
Select File > New. In the New Document dialog box, select the Page from Template category, then select the site that contains the template you want to use. In the Template list, double-click the template to create a new document.
-
Select File > Save As. In the Save as dialog box, select Template Files in the Save as type drop-down list.
-
Enter a name in the Save As box and click OK to save the new document as a nested template.
Prevent an editable region from passing through to a nested template
In nested templates, pass-through editable regions have a blue border. You can insert template markup inside an editable region so that it won’t pass through as an editable region in documents based on the nested template. Such regions have an orange border instead of a blue border.
-
In Code view, locate the editable region you want to prevent from passing through.
Editable regions are defined by template comment tags.
-
Add the following code to the editable region code:
@@(" ")@@
This template code can be placed anywhere within the <!-- InstanceBeginEditable --><!-- InstanceEndEditable --> tags that surround the editable region. For example:
<!-- InstanceBeginEditable name="EditRegion1" --> <p>@@("")@@ Editable 1 </p> <!-- InstanceEndEditable -->