INTERACTIVEPROOFING.COM

spill proof system - www.interactiveproofing.com

Menu


  Working with Tag Libraries Another powerful customization feature built into Dreamweaver is that of libraries. Tag libraries


serve as the foundation for code hints, the Tag Chooser, and the Quick Tag Editor. Towards the end of Chapter 3, we looked at various coding options including code hints. You saw that code hints appear as you author your HTML (or whatever language you use) in Code view. When you typed the < symbol and pressed the Spacebar between attributes, the code hints menu appeared, allowing you to choose from a variety of tags and attributes supported by specific tags. This organization of tags, attributes, and attribute values is stored in a tag library located in Dreamweaver's Configuration folder. Although the storage mechanism is irrelevant at this point, what is important is the fact that Dreamweaver allows you to access these tag libraries using a unique and easy-to-use dialog. The question comes up, "Why would I want to modify a tag library?" For the most part, if you're working with HTML, you wouldn't. Dreamweaver's organization of tags, attributes, and attribute values are such that they conform to HTML, XHTML, Accessibility, and W3C specifications exactly. You would, however, want to create your own custom tags if you were working with a tag-based technology such as ASP.NET that supports the development of third-party tags (also known as user controls). If you're not familiar with user controls, don't worry, we'll briefly cover them in the ASP.NET chapter in Part V, "Dynamic Web Page Development." In the meantime, let's review the power and flexibility offered by the Tag Library Editor so that you can begin to familiarize yourself with the customization of tags, attributes, and values that appear in the code hints menu. You can open the Tag Library Editor by choosing the Tag Libraries option from the Edit menu (see Figure 5.28). Figure 5.28. Dreamweaver gives you access to modify and create new tags in the Tab Library Editor dialog. [View full size image]   The Tag Library Editor dialog features three editing modes for customizing tag libraries, tags, and attributes. From Figure 5.28, you can see that the editor opens in the default attribute editing mode with the <a> tag selected from the HTML tag library. This mode exposes the following functionality: Tags: Displays a hierarchal list of tag libraries, tags, and attributes. Expand and collapse the tree to get a better idea as to the collection of tag libraries, tags, and attributes Dreamweaver supports out of thebox. You can also create your own custom tag libraries, tags, and attributes by selecting the appropriate options from the Add menu, represented by the Add (+) icon. Furthermore, you can delete a tag library by selecting the Remove () icon. Tag format: Line breaks: Choosing options from this menu formats the line breaks before, within, and/or after the tag. Experiment with these options and observe the sample in the Preview pane to get an idea as to what your code will look like and what you feel most comfortable with. Tag format: Contents: Changes the formatting of the content within the enclosed tag. Options include Not Formatted, Formatted But Not Indented, and Formatted and Indented. Tag format: Case: Allows you to set the case in which attributes should be written. Options include Default, Lowercase, Uppercase, and Mixed Case. The Default option depends on the value set in the Default Tag Case menu in the Code Format category of the Preferences window. Choosing Mixed Case opens the Tag Name Mixed Case dialog, which allows you to explicitly set the case of the tag. For example, you may choose to have the first letter uppercase with the remaining letters in lowercase. Preview: Displays a simple preview of the formatted tag based on values set in the previously mentioned menus.