Often we build a larger site when there will be a lot of the secondary page frame mode and even some small details are the same, but it is disturbing to update them when it takes some trouble to update the elements of each page over and over again. Now we can say goodbye to that time, because DW introduces the concept of "library". We can use it to batch update the same elements in the site. Large to the entire page frame, as small as one character.
The introduction of the library in the DW3 is not perfect, but in the DW4 to near perfect. Let's take a look at how to use the library to update the site:
First, the establishment of the library file.
There are two ways to create a library file, one is to select an element in the editing state, and then open the Library panel (F11 key-Select the icon in the assets to open the book-like logo ) press. Then the DW automatically creates a suffix named ". LIB to read this element to the file, a "library" folder is also established in the local site. It represents each library file is independent, when we upload the local site to the remote server, to upload the file together; the second way is to open the library panel, Right-click in the White file record area, select the new library item in the open list, and create a blank library file, Then double-click to open for editing. The first method is applicable to the creation of a library file for small elements such as text image links. The second method is suitable for the establishment of large-scale whole-length library files, in the vast majority of cases, the establishment of large-scale library files are used in conjunction with the template.
Second, the application of library files and editing.
First look at the following figure:
We've built some simple library files, This includes a connection image table. Each of them can be understood as a single element inserted into the edit area for use, just drag them directly from the library panel to where you need them. It should be noted that the inserted library file is locked. They are displayed in a light yellow color. Select a library file to view the code and you will find the following label "!--#BeginLibraryItem"/library/image1.lbi "--〉***〈!--#EndLibraryItem--〉" This represents a complete library file, There is beginning to have an end. You can change the location of the labels, but do not delete them, so that the library file is corrupted and returned to the pure edit state.
There are two ways to edit a library file, one of which is to double-click a library file in the Library panel file record area to enter the edit state. The second is to select a library file click on the Open library item in the Bounce list (open Gallery Item) Enter the edit state. When we edit and save the library file, the page that is in the edit state that is using the file is automatically updated. If there are other non-edited pages that also use the library file, then DW automatically pops up a prompt (see Figure 2).
asks if you want to synchronize updates to all pages in the local site that use the file. This function is the biggest advantage of the library file. When we make the site and upload all of the files to the remote server together with the Library folder, we get the same message from the DW when we connect to the remote site, when we change a library file ( See Figure 3),
Ask if you want to synchronize all of the pages in your site that use the library file. Click OK, the files in the remote site are updated and do not need a little bit of repetitive updates for every file.
So far, we have a skeleton view of the use of the library. As for the skilled use of this function is to rely on their own more hands. I believe this feature will bring great convenience to your site update.