This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
tab to select the paragraph tag that contains the Facebook badge, along with all its contents.
You can see in both the Design pane and Code pane that the paragraph tag is selected, along with all the elements that it contains.
14. From the Format menu, select Dynamic Web Template, and then choose Manage Editable Regions. The Editable Regions dialog box opens.
118
Microsoft Expression Web 4 Step by Step
15. In the Region Name field, type LeftBelowMenu. Click Add, and then click Close. The Editable Regions dialog box closes.
Chapter 3 Capitalizing on the Template Options in Expression Web 4
119
In the Design pane, you’ll see a tag for the LeftBelowMenu editable region, and in the Code pane, you can see that the paragraph tag that surrounded the Facebook badge is now also inside the new editable region.
16. On the Common toolbar, click Save. In the Update Files dialog box, click Yes, and then in the Update Files confirmation alert, click Close.
17. Click the Chapter3a.html tab at the top of your workspace to make that page the active document, and then click Save on the Common toolbar.
18. In the Design pane, click the Facebook badge image, and on the Quick Tag Selector, point to the
tag inside the editable region. Click the arrow, and then click Select Tag Contents. Expression Web selects the paragraph’s contents.
120
Microsoft Expression Web 4 Step by Step
19. Press Delete on your keyboard, click Save on the Common toolbar, and then click Preview. The page opens in a browser. Click a few of the navigation links to the other chapter pages.
Notice that the Facebook badge has now been removed from the Chapter3a.html page that you made, but it’s present on all the other pages. By using this method, you can selectively include or exclude elements from the DWT on a page-by-page basis.
20. Close your browser and return to Expression Web. Click the main.dwt tab at the top of the workspace to make main.dwt the active document. Consider the flexibility of the Dynamic Web Template. You can employ DWT techniques to control pages or groups of pages with one or more templates. In the next steps, you will create a new DWT and transfer a layout onto it. You can then use this new template to provide a different appearance to any page you choose.
Chapter 3 Capitalizing on the Template Options in Expression Web 4
121
21. Point to the New Document icon on the Common toolbar, click the arrow, and then click Page. The New dialog box opens.
22. In the General category, click Dynamic Web Template, and then click OK. A new master page named untitled_1.dwt opens in your workspace.
23. Click Save. The Save As dialog box opens. Double-click the sample site’s templates folder, type red.dwt into the File Name field, and then click Change Title. The Set Page Title dialog box appears. Type My Template into the Page Title field, and then click OK to close the dialog box. In the Save As dialog box, click Save. Expression Web saves the new DWT as red.dwt in the site’s templates folder. Note Although this is only the third chapter of this book, and we haven't yet discussed how to create a layout from scratch by using cascading style sheets, there is still value in becoming comfortable with templates. For example, it’s important to be able to transfer a design from an HTML file to a DWT. Many designers make use of third-party page templates. These pre-made templates are usually provided in HTML form; vendors assume that designers will be able to use the template layouts in their preferred template systems.
24. In the Folder List panel, expand the templates folder, and then double-click the red.html file to open it for editing. Click in the body of the page in the Design pane, and then on the Quick Tag Selector, point to the
tag on the Quick Tag Selector to select the paragraph tag and its content.
4. Right-click the highlighted content in the Design pane, and select Cut from the context menu. Expression Web cuts the content from the page.
5. On the Common toolbar, click Save. Click Yes in the File Update dialog box, and then click Close on the Update Confirmation alert.
Chapter 3 Capitalizing on the Template Options in Expression Web 4
131
Because these links are more appropriately used on pages that are under development rather than as a fixed part of a template, you will add this content to a new HTML page and then include it on a page-by-page basis. 6. Point to the New Document button on the Common toolbar, click the arrow, and then click HTML to create a new HTML file named Untitled_1.html.
7. Click the page in the Design pane to set your cursor. Right-click and select Paste from the context menu. Expression Web pastes the content you cut from the DWT into the new page.
8. Click Save on the Common toolbar. The Save As dialog box opens. Navigate into the templates folder, and then type ValidationLinks.html into the File Name field. Click Change Title. The Set Page Title dialog box appears. Type W3C Validation Links in the Page Title field, and then click OK. In the Save As dialog box, click Save.
Download from Wow! eBook <www.wowebook.com>
132
Microsoft Expression Web 4 Step by Step
Tip The HTML file that you will use as an Expression Web include page can contain any content you like; however, if the page contains JavaScript or any content outside the