Logo
HOW TO
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
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

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
 
 
REVIEW
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
 
VIDEO TUTORIAL
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
 
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
Top 10
- Microsoft Excel : How to Use the VLookUp Function
- Fix and Tweak Graphics and Video (part 3) : How to Fix : My Screen Is Sluggish - Adjust Hardware Acceleration
- Fix and Tweak Graphics and Video (part 2) : How to Fix : Text on My Screen Is Too Small
- Fix and Tweak Graphics and Video (part 1) : How to Fix : Adjust the Resolution
- Windows Phone 8 Apps : Camera (part 4) - Adjusting Video Settings, Using the Video Light
- Windows Phone 8 Apps : Camera (part 3) - Using the Front Camera, Activating Video Mode
- Windows Phone 8 Apps : Camera (part 2) - Controlling the Camera’s Flash, Changing the Camera’s Behavior with Lenses
- Windows Phone 8 Apps : Camera (part 1) - Adjusting Photo Settings
- MDT's Client Wizard : Package Properties
- MDT's Client Wizard : Driver Properties
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro