INTERACTIVEPROOFING.COM

bat proof mailboxes - www.interactiveproofing.com

Menu


5. As you can see from Figure 5.31, the new tag is added to the Vehicle Tags library. Use the options exposed in this interface to format


how the tag is added and formatted in Code view. Figure 5.31. The new tag is added to the tag library. [View full size image] 6. Now you'll want to add attributes for the new tag. To do this, select the tag from the list and choose the New Attributes option from the Add (+) menu. The New Attributes dialog appears. 7. Enter the attribute types in the Attributes Names text box (see Figure 5.32). Click OK. Figure 5.32. Enter a unique name that describes the attribute of the tag. 8. With the attribute still selected, choose the Enumerated option from the Attribute Type menu. Follow that up by entering comma-separated values (for example, Acura,BMW,Honda,Toyota) in the Values text box as shown in Figure 5.33. Figure 5.33. Enter a list of comma-separated values in the Values text box. [View full size image] That's it! You've successfully created your own tag library complete with one tag and an attribute for that tag. Click OK to close the Tag Library Editor and return to the Document window. To test your new tag, switch to Code view. In the <body> tag, type the < symbol. The code hints menu immediately becomes available, displaying your <car> tag within the list (see Figure 5.34). Figure 5.34. Your newly created tag appears in the code hints menu. [View full size image]   When you find the tag in the list, highlight it and press Tab to insert it. Now press the Spacebar to open the code hints menu again, revealing the attribute (types) supported by the tag. Press the Tab key again to insert the types attribute; immediately, the list of attribute values is revealed as shown in Figure 5.35. Figure 5.35. Adding the attribute and pressing the Spacebar reveals the list of custom attribute values. [View full size image]   Select a value and press the Tab key again. Enter the </ characters to have Dreamweaver automatically close the tag for you. Of course, under the HTML context, this tag won't do much. It will come in handy, however, when working with technologies such as ASP.NET and JSP that support the development of custom tags such as the one we've created here.           Summary Throughout this chapter, you saw how Dreamweaver preferences, keyboard shortcuts, and tag libraries can help you improve your workflow process. With some simple tweaks and fine-tuning, you can set up Dreamweaver to function the way you want it to instead of the way Macromedia wants you to. And although this is only the beginning in terms of interface modification and customization, it does serve as a foundation for workflow improvement and as groundwork for similar concepts in later chapters.