Xebra Create Tag Library

Revision as of 15:02, 23 July 2009 by Sandrod (Talk | contribs) (New page: This tutorial shows you how you can create a tag library for your own needs. It makes sense to add a custom library if some functionality recurs in your project(s). We will create a simple...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This tutorial shows you how you can create a tag library for your own needs. It makes sense to add a custom library if some functionality recurs in your project(s). We will create a simple tag library ("font") with a tag with the ability to format text as bold (bold).

Setting up

Every tag library needs a unique namespace (like xeb or page). We create a folder in $FONT_TAG_LIBRARY where we put all our configuration and tag library files. The API of our tag library is defined in a file called config.taglib and has to be located in $FONT_TAG_LIBRARY. Since we don't have any tags yet, the file will just contain a skeleton:

<taglib id="font">
</taglib>

With this configuration we created a tag library with the namespace "font" and no tags.

Adding Tags