Tool Dreamweaver is designed in the webpage (DW of the following abbreviation, at present highest version is 4.02, what use in article example is 4 edition) in have a very powerful function, it is pattern plate!
What charm does that pattern plate have? What kind of characteristic does it have again?
Use pattern plate, we are OK solidify site the element that every page appears.
Found WEB page through using pattern plate, can make whole site has unified color.
Want to revise pattern plate only, can revise all WEB page that used this pattern plate, and do not need a hand to move revise each page. When for instance need changes your copyright, do you want one page of one page undertake copyright is revised? If there are on 1000 pages? I believe you are met one build 3 two big. But if you used pattern plate, these do not become an issue.
A more comprehensive example is below, the can rapid use that lets you master pattern plate.
1.Editor page
Open DW, build a site, we with respect to entitle " cobweb " .
Build a blank page to regard as inside page (normally a website has a home page only, be opposite so home page we need not make it pattern plate) , entitle Body.htm.
Edit this page, if pursue,finish 1.
Graph 1, edit the Body.htm page after finishing, notice A is in, will serve as here can edit area, later development can is aimed at allude.
2.Make pattern plate
After the editor is finished, we save this page for pattern plate (the attention is not to save for common Htm webpage) . Through DW medium File à Save As Template can be put for pattern plate, the meeting after executing this order plays a window of Save As Template, if pursue 2.
Graph 2, window of Save As Template.
Graph 2 medium B place are choice site, we choose " cobweb " , c place should put name of bed pattern plate file for us, we fill B ody. The Save that presses top right corner is saved.
At this moment we press F8 v Site (site management implement) , body.dwt can see in Templates folder (when should having pattern plate file, DW can generate Templates folder automatically, dwt is file of pattern plate type)
3.Editor pattern plate
File of Body.dwt pattern plate is opened in Site, will discover with Body.htm the page is like it doesn't matter to part, but it is different actually, be to cannot add what can edit area in Body.htm. Can edit area to be able to be added in pattern plate file only.
Better to allow authority understanding " can edit area " , we make file of a Htm with this pattern plate first: Nod File à New From Template, play a Select Template window, body chooses in Emplates, the Select that clicks top right corner again can make a new Htm file. We build this the page incognito for Body2.htm. We use DW now Body.htm and Body2.htm two files are opened, compar e what differs. Your meeting discovery is being written in the top right corner of Body2.htm page " Template:bOdy " a few words. (showing this page is by Body.dwt pattern plate the file is generated) your can open-eyed at the same time discovery Body2.htm file can not edit actually (Body.htm can edit) . Was opposite, because the definition is done not have in file of Body.dwt pattern plate,this is " can edit area " result, make generated page cannot edit. So we must be added in pattern plate file can edit area. It is to add the measure that can edit area below:
1) open file of Body.dwt pattern plate, we hope the form among can edit (pursue namely 1 medium A is in) . But should be in Body.dwt file, is not Body.htm) , want herein to add so can edit area.
2) put mouse cursor A to be in in form, click mouse right key, choose New Editable Region... , play a window of New Editable Region, the name that asks to fill this to be able to edit area (we are called normal ly can edit area to label) . We fill Region01, click Ok to shut this window to finish the edition that can edit area to label currently. Can see right now the graph is like in form the indication of 3.
Graph 3, window of New Editable Region.
The specification has what a mark is Region01 to be able to edit area here.
Hereto we defined to be able to edit area, if many edit area, likewise OK do sth following a set pattern.
※ still can pass New Editable Region of à of Modify à Templates... generate new can edit area, if want to delete,can edit area, can pass Remove Editable Region of à of Modify à Templates... , operate by clew next can.
4.Make a page with pattern plate
Also had alluded to make the move of the page with pattern plate before us actually, pass File à New From Template namely. Consult please the concerned measure of the 3rd pace. We make a page that the name is Body3.htm with pattern plate now. At this moment you can discover, in Body3.htm page besides can edit area Region01, other place mouse became limitative state. We can add the content that we need in edition section here, for instance we write an article casually. Can need according to ours so, use pattern plate to make a page.
5.Content of modification pattern plate and newer site file
Open file of Body.dwt pattern plate, the place that us need revises undertakes modification, for instance we change Logo picture or He Fei of long change to another post can edit area, be added even or delete can edit area to wait.
Those who change Logo to explain pattern plate is how to replace a document is use below.
We change Logo picture into the picture that additionally we like, body.dwt file is saved after finishing, at this moment DW can play a window inquiry to whether need to replace a document, choose Update, DW is met automatic update all pages that make with this pattern plate, the DW when updating can play an Update Pages window, after finishing, can give out in Update Pages window newer daily record.
If ※ chose Don ' T Update, DW holds pattern plate file directly, do not update a page temporarily, but we are OK the hand uses newer page, should choose Update Pages of à of Modify à Templates only... can.
At this moment we open the page that random makes with Body.dwt, be like Body3.htm. Can discover Logo picture has been changed.
Discover not hard, use this function, our OK and relaxed settlement the site replaces an issue, the function of pattern plate is very powerful, this article has the effect of cast a brick to attract jade-offer a few commonplace remarks by way of introduction so that others may come up with valuable opinions only, a lot of functions fail to allude as a result of length problem, oneself want much trial and error, such ability appreciate the pattern plate elegant demeanour of DW adequately.
In DW, still have a function that calls a library, follow pattern plate to be able to cooperate organicly, such meetings make the function of pattern plate more powerful, if reader response has fun at, I am willing to be displayed for everybody on this one gift.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment