wrongusername
wrongusername

Reputation: 18918

Dreamweaver nested templates

So I'm trying to achieve something like this in Dreamwaver CS5. I have one optional editable region (optional because I do not want that thing in certain webpages) and another editable region in my "master" template. So what I'm doing now is to create a new template from my master template, and then change the optional editable region to be displayed, saving it as a new template, and finally creating new webpages from the new template.

Unfortunately, it seems everything that was editable in the new template is editable in the new webpage I just created. I want only the non-optional editable region in the master template to be editable in all new webpages created from the new template. How can I accomplish this?

Upvotes: 6

Views: 2922

Answers (2)

Manu de Hanoi
Manu de Hanoi

Reputation: 271

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 [blah], is no longer editable in documents based on the nested template

source http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7aa1a.html

Upvotes: 0

lime
lime

Reputation: 7101

It's annoyingly simple (and kind of strange).

In the second-level template, add this expression: @@("")@@ anywhere in the editable region you want to lock. Now all pages derived from that template will display it as non-editable.


You can do some fun things with Dreamweaver's template expressions and variables, but finding any real documention has proven difficult. Mainly because it's essentially useless if you can use PHP. And it took some time figuring out that @@(lang!="fin"?(lang=="swe"?"Swedish title":"English title"):"Finnish title")@@@@(sub!=""?" :: "+sub:sub)@@ was the specific expression i wanted for a non-PHP client's page title. So, yeah.

Upvotes: 3

Related Questions