6 Replies Latest reply on Feb 4, 2012 9:40 AM by MurraySummers

    How do you make more than one editable region in a nested template?  DW CS5

    jim redfield

      I have a master template [ http://www.griffinchaseoliver.com/Templates/Untitled-7.dwt ] with an editable Region3 in the <body>.

       

      I have a nested template [ http://www.griffinchaseoliver.com/Templates/Untitled-8.dwt ] spawned from -7 above, with a sequence of <h1> <p> <h2> <p> copy blocks.

       

      In pages spawned from -8, I want the text in <h1> and <h2> to be un-editable but allow the text (but not the tags) in the two <p>'s to be changable.

       

      I haven't been able to figure out how to do this. Help appreciated. Thanks - Jim

        • 1. Re: How do you make more than one editable region in a nested template?  DW CS5
          Nancy OShea Adobe Community Professional & MVP

          Nested templates, eeeewwww nasty.   Don't do that.  You're making this way more complicated than it needs to be.

           

          How many Templates in your site?

          How many pages in your site?

           

           

          Nancy O.

          Alt-Web Design & Publishing

          Web | Graphics | Print | Media  Specialists 

          http://alt-web.com/

          http://twitter.com/altweb

          1 person found this helpful
          • 2. Re: How do you make more than one editable region in a nested template?  DW CS5
            jim redfield Level 1

            All I’m doing is trying to make use of a feature DW has made available. It’s obviously not worth the effort, although in years past an earlier iteration of DW did have a usable template function which I used to good advantage, admittedly by working on the code side. I figured that now, six or more years later the feature would have worked even better. My bad.).

             

            My site (which is replacing what’s behind that URL now) has a group of about 15 similar pages, another group of 60+ similar pages, and a smattering of unique pages that share little more that the masthead art. So maybe that means three master templates to make things easier and I’ll tweak things later as needed using search and replace in the code, etc.

             

            If you have a better approach to managing my bunches of pages I’m all ears.  …and thanks, btw, for the ‘eeeewwww nasty’ candor!

             

            - Jim

            1 person found this helpful
            • 3. Re: How do you make more than one editable region in a nested template?  DW CS5
              Nancy OShea Adobe Community Professional & MVP

              Murray, our resident DWTemplate expert, says it best:

               

              "When your site becomes as large as yours sounds, the initial decision to use Templates becomes tedious, since each saved Template change requires that you upload ALL affected local files to reflect that change.  As the site becomes larger and larger, this requirement becomes more and more tedious.  It's not that the Templates don't work.

               

              I still use Templates on nearly every site I build, but I also use server-side includes to minimize this need.  I use the following scheme....

               

              First, I mentally separate the page layout into three sections:

               

              1.  Stuff that will not change for the life of the site (i.e., the basic

              structural elements).

               

              2.  Stuff that *could* change from time to time (e.g., navigation elements,

              burst advertisements, section-specific navigation, etc.).

               

              3.  Stuff that *will* change from one page to the next.

               

              Then I create a Template containing all class1 elements.  Next I create

              server-side include files containing all class 2 elements and place them on

              the Template as needed.  Note - some of the class 2 elements may be

              "section-specific elements", and their placement on the Template will be

              subject to the next item.  Finally, I insert editable regions to cover the

              class 3 items, INCLUDING the section-specific navigation.

               

              This allows me to just cookie-cut the rest of the site.  I estimate that

              even for fairly large sites, about 80% of my work goes into planning and

              creating this Template file [and CSS style sheets]."

               

              =========================

               

              "Nested Templates are never a good idea.  Consider using Snippets, or Library items, or preferably server-side includes.  For example, when I build a site, the navigation elements always go into server-side includes.  That way, I make a single change to the include file, upload that include file, and all pages automatically inherit that change.

               

              Templates are for full pages, not parts of pages, although a single template can contain oodles of these replaceable elements mentioned above. Don't fall prey to the idea of using either nested templates or multiple templates for a single site.  Both of those approaches will unnecessarily complicate your life."

               

               

               

              Nancy O.

              Alt-Web Design & Publishing

              Web | Graphics | Print | Media  Specialists 

              http://alt-web.com/

              http://twitter.com/altweb

              1 person found this helpful
              • 4. Re: How do you make more than one editable region in a nested template?  DW CS5
                MurraySummers Level 8

                I see that Nancy has done the heavy lifting for me! (thanks, N!).

                 

                As far as I'm concerned, DW Templates are still extremely useful, but I use them in such a way that once made and put in place, I rarely ever need to go back into them for anything.  My approach is in Nancy's post.

                 

                The problems come in when you nest them.

                 

                Now - how can we help you with your current problem?

                • 5. Re: How do you make more than one editable region in a nested template?  DW CS5
                  jim redfield Level 1

                  Murray & Nancy -

                   

                  Thanks for the guidance. For the record, I created a set of nested templates three deep and an html page at the end of the chain, just to be sure I could. Everything worked (and validated), but it did require modest hand-coding. Seems like DW got the templating mechanisms set up well, but did a very poor job of explaining it, and even worse trying to build error-checking appropriate to complex templating  into its GUI. Anyway, I now have that tool in my kit.

                   

                  ...putting that aside, I've never used SSI but I take Murray's point that it would be a real time-saver for working on large page sets like mine. I researched SSI briefly and the pdf link below shows my attempt to understand how you'd set up appropriate SSI components, a template, and editable regions to use it. Before digging deeper into SSI and my 60 pages, can you confirm that I have the general approach right? Thanks.

                   

                  [ http://www.griffinchaseoliver.com/Library/downloads/SSI%20strategy.pdf  ]

                   

                  Jim

                  • 6. Re: How do you make more than one editable region in a nested template?  DW CS5
                    MurraySummers Level 8

                    You have the wrong nomenclature.  The include files themselves could be named with any extension you care to use, e.g., main-one.htm, main-one.foo, main-one.jim, etc.  It's the parent pages (i.e., the page that is RECEIVING the include file) that must be namedd with the extension that triggers a server parse.

                     

                    In addition, you have taken my gestalt a little too literally.  I would leave main-one and main-two as part of the standard template (how often will you change that stuff?). 

                     

                    The rest looks OK.

                     

                    My includes are definitely navigation elements.  In addition, I usually do a masthead include, a footer include, and a credits include, as well as any suordinate or section specific navigation.