Do the site, trouble in the update and revision, especially large-scale updates, if not with CMS system, manual workload is very large.
Tell you a secret, in fact, as long as a good template tool, you can be a good "wholesale" page. Common web-making tools such as Dreamweaver have this feature, and using a template can reduce a lot of repetitive work.
First, the establishment of templates
1. Create Template page
The easiest way to do this is to save a Web page as a template file by executing the command: File→save as Template,dreamweaver creates a template folder in the site root directory--templates to save the template.
Of course, you can create a new template: Window→templates, will appear in the Templates panel, click the New Template button in the lower right corner, enter the filename, set up an empty template, and then click the Open Template button to open the template, Automatically stored in the site template folder templates.
A new, open template page is no different from a normal Web page, but you can also add tables, layers, pictures, animations, scripts, set page properties, and more.
For example: here to make a template as an example to illustrate. On this page, we want the site identification map and the bottom navigation chart on the left to appear on each page. The logo map is stacked by two pictures, the text on the navigation map "recent update", "read online", "packaged download" and so on are divided into several hot zones linked to different files, they are unchanged in each page. The page descriptions in the upper-right and bottom-left pop-up menu buttons are different. To keep the pages neat, we use tables to lay out these elements.
To be exact, it's just a "quasi-template" with no editable region, and the editable region is set below.
2. Set Editable region
Set the template editable region, generally there are two methods.
New Editable region: Select command: Modify→template→new Editable Region. You can change the area to an editable region by clicking it in a blank area and then executing the command.
Mark an area as an editable region: Select command: Modify→template→mark selectin as Editable Region. If a region already has some text, and you want to partially retain its content in later hypertext files, select the area and then execute the tag command.
Cancel Editable Status: Select command: Modify→template→unmark Editable Region. After you execute the command, a dialog box pops up with a list of existing editable regions, with the name of the zone you want to cancel, and confirm.
For example: In a large blank area, random click, execute modify→template→new Editable region command, in the pop-up dialog box, enter the name: Main; Select the bottom left corner of this page to explain the following text, the implementation of Modify→template→mark Selectin as Editable region command, enter name: Exp. You can see the editable area shown as light blue, save to complete the template production.
Second, the use of template batch production of Web pages
1, according to the template to create a new page
Command: File→new from Template. Pop-up dialog box, select the template from the list of templates, the new page appears in addition to the editable region has a light yellow background, is not able to modify the part. The blank main edit area can be inserted directly into the table, text, pictures and other operations, the EXP edit area retains the original text, modify or edit all can.
2. Apply a template to a page that already has content
Command: Modify→template→apply Template to Page. Selecting a template also pops up a dialog box that lets you select which editable region the existing orphaned content is saved to (Choose Editable Region for orphaned content). If you don't want to keep it, you can choose (none).
For example: We first create a new normal page, enter: "CIW computer Studio", execute modify→template→apply Template to page command, select Template test, existing content save area Select Main, After confirmation, you can see that the page automatically becomes the form of the template page, and the "CIW computer Studio" appears in the main editing window.
3, update the template to fully update the site
After you have created some pages based on a template, after you have modified the template to save it, a dialog box pops up, listing all pages that use the template, and asking if you want to update it.
Another approach is to execute the modify→template→update pages command. To select a template for a site or site from the Update Pages dialog box (multiple templates can be used in the same site), click the Start button on the right, and the software automatically searches for and updates the page associated with the template. Very convenient!
For example: Test template in the left of the graphic "reading the Million station" picture is stacked with a layer on top of another picture, do not want it now, but also want to delete all the pictures in the page. You can open the template test.dwt, delete the layer, save the template, and click the "Update" button on the right.
Note: You need to define a site before you create and use a template. The method is to execute the command: Site→define Sites, specify the site name and the local root. The template uses a relative path, and if the site is not specified locally, the software cannot locate and save the template file accurately, and when the template is created and updated, hyperlinks in the page cannot be changed in the same location as the page file.