Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Vista

Adobe Dreamweaver CS5 : Using Library Items and Server-side Includes (part 1) - Using the Library Assets Panel - Adding a Library item

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
11/29/2013 1:44:51 AM

1. Dreamweaver Library Items

Library items within Dreamweaver are another means for you, as a designer, to maintain consistency throughout your site. Imagine that you have a navigation bar on every page that contains links to all the other pages on your site. It's highly likely that you'll eventually (probably more than once) need to make changes to the navigation bar. In a traditional Web development environment, you must modify every single page. This creates numerous opportunities for making mistakes, missing pages, and adding code in the wrong place. Moreover, the whole process is tedious — ask anyone who has had to modify the copyright notice at the bottom of every Web page for a site with more than 1,000 pages.

One traditional method of updating repeating elements is to use server-side includes. A server-side include causes the server to place a component, such as a copyright notice, in a specified area of a Web page when it's sent to the user. This arrangement, however, increases the strain on your already overworked Web server, and many hosting computers do not permit server-side includes for this reason. To add to the designer's frustrations, you can't lay out a Web page in a WYSIWYG (What You See Is What You Get) format and simultaneously see the server-side scripts (unless you're using Dreamweaver). Therefore, you either take the time to calculate the specific amount of space the server-side script takes up on the Web page, or you cross your fingers and guess.

Dreamweaver offers you a better way. You can use an important innovation called the Library. The Library is designed to make repetitive updating quick, easy, and as error-free as possible. The Library's key features include the following:

  • Any item — whether text or graphic — that goes into the body of your Web page can be designated as a Library item.

  • After they are created, Library items can be placed instantly in any Web page in your site, without your having to retype, reinsert, or reformat text and graphics.

  • Library items can be altered at any time. After the editing is complete, Dreamweaver gives you the option to update the Web site immediately or postpone the update until later.

  • If you are making a number of alterations to your Library items, you can wait until you're finished with all the updates and then make the changes across the board in one operation.

  • You can update one page at a time, or you can update the entire site all at once.

  • A Library item can be converted back to a regular non-Library element of a Web page at any time.

  • Library items can be copied from one site to another.

  • Library items can combine Dreamweaver behaviors — and their underlying JavaScript code — with onscreen elements, so you don't have to rebuild the same navigation bar every time, reapplying the behaviors repeatedly.


2. Using the Library Assets Panel

Dreamweaver's Library control center is located on the Assets panel in the Library category. Here you find the tools for creating, modifying, updating, and managing your Library items. Shown in Figure 1, the Library category is as flexible and easy to use as Dreamweaver's other primary panels, with straightforward command buttons, a listing of all available Library items, and a handy Preview area.

You have two ways to access the Library items:

  • Choose Window => Assets.

  • Click the Library icon on the Assets panel.

To use Library items, you must first create a site root folder for Dreamweaver; Library items cannot be modified when you are working directly with an FTP or RDS server. A separate Library folder is automatically created to hold the individual Library items and is used by Dreamweaver during the updating process.


Ideally, you save the most time by creating all your Library items before you begin constructing your Web pages, but most Web designers don't work that way. Feel free to include, modify, and update your Library items as often as necessary as your Web site evolves — that's part of the power and flexibility you gain through Dreamweaver's Library.

Figure 1. With the Dreamweaver Library feature, you can easily add and modify objects on an entire Web site.

2.1. Adding a Library item

Before you can insert or update a Library item, that item must be designated as a Library item within the Web page. To add an item to your site's Library, follow these steps:

  1. Select any part of the Web page that you want to make into a Library item.

  2. Open the Library category of the Assets panel.

  3. From the Library category (refer again to Figure 1), click the New Library Item button.

    The selected page element is displayed in the preview area of the Library category. In the Site list — the Library item list — a new entry is highlighted with the default name Untitled.

    NOTE

    If the text you've selected has been styled by a CSS rule, Dreamweaver warns you that the appearance may be different because the style rule is not included in the Library item. To ensure that the appearance is the same, include the Library item only on those pages with the appropriate CSS styles.

  4. Enter a unique name for your new Library item and press Enter (Return). The Library item list is re-sorted alphabetically, if necessary, and the new item is included.

Drag-and-Drop Creation of Library Items

A second option for creating Library items is the drag-and-drop method. Simply select an object or several objects on a page and drag them to the Library category (either the preview area or the Site list pane); release the mouse button to drop them in.

You can drag any object into the Library panel: text, tables, images, Java applets, plugins, and/or ActiveX controls. Essentially, anything in the Document window that can be HTML code can be dragged to the Library. Similarly, as you might suspect, the reverse is true: Library items can be placed in your Web page by dragging them from the Library category and dropping them anywhere in the Document window.


When a portion of your Web page has been designated as a Library item, yellow highlighting is displayed over the entire item within the Document window. The highlighting helps you to quickly recognize a Library item. If you find the effect distracting, you can disable it. Go to Edit => Preferences (Dreamweaver => Preferences) and, from the Highlighting panel of the Preferences dialog box, clear the checkbox to the right of the Library Items color selection. Alternatively, clearing View => Visual Aids => Invisible Elements hides Library Item highlighting, along with any other invisible items on your page.

Dreamweaver can include Library items only in the <body> section of an HTML document. You cannot, for instance, create a series of <meta> tags for your pages that must go in the <head> section.

Other -----------------
- Configuring Startup and Troubleshooting Startup Issues : How to Configure Startup Settings (part 2) - How to Use BCDEdit
- Configuring Startup and Troubleshooting Startup Issues : How to Configure Startup Settings (part 1)
- Configuring Startup and Troubleshooting Startup Issues : Important Startup Files
- Accessing and Using Your Network : Collaborating with Windows Meeting Space (part 2)
- Accessing and Using Your Network : Collaborating with Windows Meeting Space (part 1)
- Accessing and Using Your Network : Working with Offline Files and the Sync Center (part 2) - Synchronizing Offline Files, Handling Synchronization Conflicts
- Accessing and Using Your Network : Working with Offline Files and the Sync Center (part 1) - Working with Network Files Offline
- Accessing and Using Your Network : Sharing Resources with the Network (part 3) - Hiding Shared Resources
- Accessing and Using Your Network : Sharing Resources with the Network (part 2) - Sharing a Resource
- Accessing and Using Your Network : Sharing Resources with the Network (part 1) - Setting Up File and Printer Sharing, Deactivating the Sharing Wizard
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server