Dreamweaver2004: Using templates as Web pages

Source: Internet
Author: User
Tags add insert modify window dreamweaver
dreamweaver| templates | Web pages with the popularity of the internet, many people are not satisfied with just surfing the internet, but want to participate in deep. Now, having your own web site has become a trend. Although it is not difficult to make a simple Web page, it is not so easy to make a very refined website, so we have specially prepared the latest website design software dreamweaver MX 2004 series Tutorials, I hope to help you.

Usually in a website there will be dozens of or even hundreds of basic similar styles of pages, if you reset the net every time

The page structure and navigation bar under the same column, various icons are very troublesome, but we can use the Dreamweaver MX 2004 template features to simplify the operation. In fact, the function of the template is to separate the page layout and content, after the layout is designed to store as a template, so that the same layout of the page can be created through the template, so can greatly improve work efficiency.

First, the production of templates

Make a template and make a common page exactly the same, just do not need to make all parts of the page to complete, just need to make a navigation bar, title bar and other pages of the public part, and the middle area with the content of the page to fill.

Step one: First run the "file→new" command in Dreamweaver MX 2004, then select the "Template page→html Template" option from the window shown in Figure 1, and then click the "Create" button to create a template file.

Step Two: Insert the Web page frame, navigation bar, flash title, and all the public elements of the page in page Design view (Figure 2), and then run the File→save command to save the template.

Tip: You can download a favorite Web page, and then open it in Dreamweaver MX 2004, just keep the frame and other elements after the "File→save as Template" command to save it as a template, so you can save a lot of time to make a template.

In order to avoid editing errors that result in changes in the elements in the template, the contents of the template are not editable by default, and the area can only be changed in the document created by the template if a range or paragraph of text is set to editable. Use the mouse to select an area (that is, the area of each page with different content), then run the modify→templates→new Editable Region command, and set a name for the area in the pop-up dialog box, which completes the editing area.

Tip: After you set up the editing area, you need to run the "file→save" command to save your changes.
Second, the use of templates

Once you have the template, you'll need to use them when you edit the page. Just run the "file→new" command in the Dreamweaver MX 2004 main window to see the new window shown in Figure 1, and then go to the Templates tab to see the saved template and choose one that can also be previewed in the preview area in the right section (Figure 3), Finally select a favorite template and click the lower "Create" button to open this template.

In the open template, the area that cannot be edited is displayed in a highlighted state, but some locations are locked, but not highlighted, mainly because the picture just covers the background color. In this case, you can run the "edit→preferences" command, select "Highlighting" in the pop-up window's "Category" list, and then select the Show option next to "Locked regions" in the right section (Figure 4) and set the highlight color to blue so that you can clearly identify the locked area in the template.

Tip: If you still can't see the highlight effect, you can also select the view→visual aids→invisible Elements command in turn.

Finally, we just add the content of the page in the editable region, such as add some text description or insert the corresponding picture, finally through the "file→save" command to save the page.
Iii. Modifying and replacing templates

After creating a number of pages through a template, if you need to change the page or add columns, and then manually modify all the pages is very cumbersome, so we can use the Dreamweaver MX 2004 template modification function to solve this problem. For example, after we have modified the template, run the "file→save" command to save the template, and then pop-up the prompt box to ask if you want to update all the pages that use the template (Figure 5), after the confirmation will show the total number of updated pages and update the time and other information.

In addition, Dreamweaver MX 2004 also provides a way to replace a template for a Web page, so replacing a template is a bit like changing clothes, as long as you make a variety of templates, and then you want to wear which one to wear. However, the template is not easily replaceable, you can replace the template is the condition that the replacement of the page must be created through the template, and the page can be edited in the number and name of the template to be replaced by the number of editable regions and names consistent. For example, there are 3 editable regions in a Web page, the names are T1, T2, T3. There is also a template, no matter what the structure of the template, as long as it also has 3 editable regions, and the name is also T1, T2 and T3, then you can use it to replace the original page of the new template, The contents of the 3 editable regions on the page remain unchanged. The specific replacement template method is also very simple, as long as the "windows→templates" command to open the template panel, at this time you can select the appropriate template from the upper area, and then click the Apply to Page button, so you can quickly complete the template replacement operation.

Tip: Use this feature to make two versions of summer and winter for the home page, so you can easily replace the template.

In fact, the relevant content of the template is still a lot, but limited to the length of the selected part of the introduction, I hope you can extrapolate, thoroughly understand the subtlety of the template.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.