6

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?

wrongusername
  • 18,564
  • 40
  • 130
  • 214
  • 1
    I have to work with ColdFusion builder and Dreamweaver CS5 at work and I have suicidal thoughts until I get to come home and use Visual Studio... CFB doesn't have a code formatting feature, but DW does. DW doesn't have begin/end tag highlighting but CFB does. WTF – The Muffin Man Feb 12 '11 at 06:24
  • darn I started a bounty on this and nobody answered. waste of 50 rep :( – wrongusername Feb 14 '11 at 08:24
  • it's a good question mate, haven't used editable regions to that extent though... – Marin Feb 15 '11 at 15:04

2 Answers2

3

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.

lime
  • 6,901
  • 4
  • 39
  • 50
  • Hey lime, your @@("")@@ gives me a syntax error. Trying gave me a blank expression error. Would you mind updating your answer? Thanks! – wrongusername Mar 26 '11 at 06:40
  • I'm sorry @wrongusername, but I can't reproduce that. The only clue I can think of is that I made the site in CS4, and I have had some issues with editing it later in CS5 (namely, editable regions not being selectable in Design view). However when creating a new test site from one of the built-in layouts everything seems to work. [Adobe's help](http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7a9ea.html) does not give any more details either. – lime Mar 27 '11 at 19:18
  • Oh well, thanks for your help anyways! I might try starting a new site and copying the stuff from the old one over to see if it helps any. – wrongusername Mar 30 '11 at 01:27
0

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

Manu de Hanoi
  • 272
  • 3
  • 14