Chapter 11: Streamlining Sites with Dynamic Web Templates


Strangely enough, as your site grows in size beyond a handful of pages, you may find yourself doing more and more repetitive work, especially when you're expanding your site. If your pages' layout and design are consistent, creating new pages generally involves copying and pasting material from old pages and then inserting new content. The job isn't necessarily difficult, but it's certainly not exciting, and it's definitely time consuming.

Expression Web cuts out some of the drudgery with Dynamic Web Templates. In this chapter, we demonstrate how Dynamic Web Templates simplify creating and maintaining a Web site (especially large sites or those with more than one author). We also show you how to create Dynamic Web Templates and how to put them to work in your site.

Introducing Dynamic Web Templates

Before you jump into using Dynamic Web Templates, you should understand what you're getting yourself into. Dynamic Web Templates can save you a lot of time, but can also cause unnecessary hassle when used for the wrong type of site. Read on for details about what Dynamic Web Templates do, and for advice about how (or whether) to use them in your site.

Separating fixed and unique content

Dynamic Web Templates enable you to place all the stuff that stays the same across pages (fixed content) into a template. Typical bits of fixed content include logos, page banners, copyright notices, and navigation. You then attach the template to separate pages containing unique content, and the fixed content appears in the page automatically.

Think of Dynamic Web Templates as your site's "letterhead"-a set of standard elements that appear in several pages, independently of the pages' content.

Dynamic Web Templates versus regular page templates

Dynamic Web Templates differ from regular page templates in three important ways. With dynamic templates, you can

  • Keep several templates on hand. You can create several Dynamic Web Templates and then radically change the look of a page by switching the Dynamic Web Template attached to that page. (You can use a regular page template only as a page's starting point; you can't later "detach" a regular page template.)

  • Update several pages at a time. You can attach a single Dynamic Web Template to several pages and then change the fixed content in all the pages by simply updating and saving the Dynamic Web Template. (Regular page templates can only be used individually.)

  • "Lock" fixed content so that other authors can't edit it. When you attach a Dynamic Web Template to a page, you (and other site contributors) can type only inside the areas of the page that you define in the template as editable regions. The rest of the page is "locked," and its content can't be edited. In this way, you can rest assured that the page's layout and design remain consistent, even when several people work on the site.

Editable regions are simply empty spaces inside the Dynamic Web Template that act as placeholders for each page's unique content. After you apply a Dynamic Web Template to a page, you can place any type of content you like (text, graphics, headings, tables, form elements-anything) into the page's editable regions.

Deciding whether you should use Dynamic Web Templates in your site

REMEMBER 

To figure out whether Dynamic Web Templates would cut your workload or add to it, you must step back and take a look at your site's content. Sites that are good candidates for Dynamic Web Templates contain several pages with a consistent design and layout.

For example, if most or all of the pages in your site use the same background graphic, have a page banner or company logo at the top of the page, and use the same layout, it makes sense to place those fixed elements inside a Dynamic Web Template so that you don't have to rebuild these elements each time you add a new page to the site. With the help of the Dynamic Web Template, creating a new page becomes a matter of attaching the Dynamic Web Template to a new, blank page, filling the new page's editable regions with unique content, and then formatting that content however you like.

For a simple site, you might use only a single template for most or all of your pages. For a more complex site with different sections, each with its own design, you may want to use more than one Dynamic Web Template.



Microsoft Expression Web for Dummies
Microsoft Expression Web For Dummies
ISBN: 0470115092
EAN: 2147483647
Year: 2004
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net