Tags for this article: dreamweaver, html, javascript, php, web design, website
One of the most common problems that all the web developers come across is how to include one bit of the HTML code into some other web page without actually rewriting the code every time. Unfortunately that cannot be achieved using straight HTML; you will have to opt for some other technology especially the server technology such as PHP or SSI or JAVA Script. HTML’s editor, Dreamweaver understands this problem and comes to rescue. Any web developer who would have got involved in building a website with more than ten pages would definitely recognize the value in having shared include files which once edited can be used for updating the entire website.
These special include files are most commonly referred to as the library files and are generally stored in the Files tab in the assets of your web site. Before creating a library file it becomes quite essential to first create a Dreamweaver site and then the library item can be made available as an asset to the entire site. In order to create Dreamweaver library Include file first you will have to open the library panel simply by clicking on the window Assets and then getting on to choose the library button. Now you will have to select that particular portion of the HTML that you would want to be converted to the HTML. This could be either a either a block of HTML or simply a section of the page in design view.
This selected HTML block is now to be dragged the library pane and finally dropped it there. Finally a name should be given to the library item which will help you in the future reference. Once your library item has been created it can further be used onto any page on your website by simply dragging the library item onto the new page and then Dreamweaver will do its part of job by displaying the relevant code and displaying it as a library item. The work does not get over just by creating the library item. Its main power is by re-using them as and when required.
The library can easily be placed on any page on the Dreamweaver website where it has been defined in. Once you edit this library item Dreamweaver will automatically update all the pages that are making use of this library item. You can achieve this by first opening the library item that needs to be edited by simply double clicking on that particular library item in the asset pane. Edit the library item whatever you want to and simply click save. Dreamweaver would immediately ask you if all the files that use this particular library item need to be updated; you will have click update and finally close all the log windows. If a lot of files need to be updated, it would take a little till the entire process is over. Always remember, once you have finished updating all the files it is mandatory to upload all the files on to your server. If this is not done then your customers will not have the access to the changed content.