3 Replies Latest reply on Jan 13, 2009 11:51 AM by DwFAQ

    Applying a Template to Multiple Pages

    rsderrick
      I have a site that is fairly simple. I want to wrap a template around a main content area. Is it possible to apply a template to multiple pages at a time instead of having to do it one page at a time? If so can someone give me some direction?

      Thanks so much!
        • 1. Re: Applying a Template to Multiple Pages
          DwFAQ Level 4
          Heya,

          If you're using php the best way I've found is to use php include to add the same instance to multiple pages.

          For instance it you use <?php include("navbar.php"); ?> on all your pages for the navbar with the code for navbar in navbar.php then all the pages with the <?php include(""); ?> will include the code from navbar.php

          Then all you need to do is edit navbar.php to have all pages with <?php include(""); ?> updated with code included in navbar.php

          hope that helps.
          • 2. Re: Applying a Template to Multiple Pages
            Level 7
            How many pages?

            There is no real facility in DW for batch application of Templates. That's
            really a good thing, especially if your Template has more than one editable
            region in the body.

            The best and least prone to error method would be to a) spawn a new page
            from the template, b) copy and paste the content from the existing page, and
            c) overwrite the old page with the new one when done.

            --
            Murray --- ICQ 71997575
            Adobe Community Expert
            (If you *MUST* email me, don't LAUGH when you do so!)
            ==================
            http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
            http://www.dwfaq.com - DW FAQs, Tutorials & Resources
            ==================


            "rsderrick" <webforumsuser@macromedia.com> wrote in message
            news:gkhgec$5ig$1@forums.macromedia.com...
            >I have a site that is fairly simple. I want to wrap a template around a
            >main
            > content area. Is it possible to apply a template to multiple pages at a
            > time
            > instead of having to do it one page at a time? If so can someone give me
            > some
            > direction?
            >
            > Thanks so much!
            >

            • 3. Re: Applying a Template to Multiple Pages
              DwFAQ Level 4
              Per Murray's recommendation you would have to perform edits on every page that you wanted a universal change such as navigation links which is an undesired approach.