Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 320
wrongusername Avatar asked Jan 29 '11 05:01

wrongusername


1 Answers

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.

like image 86
lime Avatar answered Sep 29 '22 11:09

lime