• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Moving on Down the Road: Int... > Adding Custom Tags to the Tag Choose...

Adding Custom Tags to the Tag Chooser

When registering custom tags you’ve created—be they XML, ColdFusion, .Net, or another language—the Tag Library Editor enables you to use the Attributes tab of the Tag inspector and code hints, but it can also offer you another feature if you know this trick...and you soon will! If you want to take advantage of the tag chooser with your custom tag, you need to do things a little differently when adding tags through Edit > Tag Libraries. Instead of adding to an existing tag library, you need to create your own tag library and store your custom tags there. To start your own tag library, click the (+) button, and then choose New Tag Library. Give the tag library a name such as My Custom Tags or something more relevant, and then click OK. Now check the boxes for the document types you want to make your custom tags available in the Used In section. All ColdFusion custom tags must start with cf_, and ASP.Net custom tags always start with asp:. Some other server languages require a specific prefix for custom tags as well. You can save yourself some typing when adding tags by adding the prefix in the Tag Prefix field if one applies to your custom tags; if you’ve added a prefix, you won’t have to enter it when adding new custom tags. You can now add tags and attributes as you normally would. (See the “Create Your Own Code Hints” tip in Chapter 9 for more information.)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint