NAME
AxKit::App::TABOO::XSP::Category - Category management tag library for TABOO
SYNOPSIS
Add the category: namespace to your XSP <xsp:page>
tag, e.g.:
<xsp:page
language="Perl"
xmlns:xsp="http://apache.org/xsp/core/v1"
xmlns:category="http://www.kjetil.kjernsmo.net/software/TABOO/NS/Category"
>
Add this taglib to AxKit (via httpd.conf or .htaccess):
AxAddXSPTaglib AxKit::App::TABOO::XSP::Category
DESCRIPTION
This XSP taglib provides two tags to retrieve a structured XML fragment with all information of a single category or all categories of a certain type.
Apache::AxKit::Language::XSP::SimpleTaglib has been used to write this taglib.
Tag Reference
<get-category catname="foo"/>
This tag will replace itself with some structured XML containing all fields of categories of type foo
. It relates to the TABOO Data object AxKit::App::TABOO::Data::Category, and calls on that to do the hard work.
The root element of the returned object is cat:categories
and each category is wrapped in an element cat:category
and contains catname
and name
.
<get-categories type="foo" onlycontent="true"/>
This tag will replace itself with some structured XML containing all categories of type foo
. It relates to the TABOO Data object AxKit::App::TABOO::Data::Plurals::Categories, and calls on that to do the hard work. See the documentation of that class to see the available types. If a boolean onlycontent
attribute (or child element) is set, it will check if there are articles or stories in the categ
category types, and return only those.
The root element of the returned object is categories
and each category is wrapped in an element (surprise!) category
. The type will also be available in an attribute called type
, and ordered alphabetically by name.
<store/>
It will take whatever data it finds in the Apache::Request object held by AxKit, and hand it to a new AxKit::App::TABOO::Data::Article object, which will use whatever data it finds useful. It will not store anything unless the user is logged in and authenticated with an authorization level. It will perform different sanity checks and throw exceptions if the user tries to add data it is not authorized to do.
Finally, the Data object is instructed to save itself.
<exists catname="foo"/>
This tag will check if a category allready exists. It is a boolean tag, which has child elements <true>
and <false>
. It takes a catname, which may be given as an attribute or a child element named catname
, and if the category is found in the data store, the contents of <true>
child element is included, otherwise, the contents of <false>
is included.
FORMALITIES
See AxKit::App::TABOO.