attredit


NAME

attredit - Web interface to Communiware attributes.


DESCRIPTION

This interface allows to create new COMPUTED, QUALIFIED and COOKIE attributes and edit i18n messages for all attributes.

It also allows create/edit values tables for all attributes.

It is impossible to create extended item attribute via this interface. Use ``Create extended attributes table'' in typeedit to do so.


ATTRIBUTE PROPERIES

UPDATABLE ATTRIBUTES

Only things which you may edit for this attributes are values tables and descriptions, short and long. Short is used in the moderator interaface, long is unused except for COOKIE attributes.

COMPUTED ATTRIBUTE

Main proprety of COMPUTED attribute is SQL query which performs computation. One query maybe used for more than one attributes. In this case it should return several columns, named after those attributes.

IMPORTANT Even if query returns only one column, it should have same name as attribute.

Query should depend on one argument (contain one question mark for parameter substitution). Item id of current context would be substituted here.

You may test query without saving an attribute by entering item id in appropriate field and pressing Test button.

QUALIFIED ATTRIBUTE

Qualified attribute also has query. This query should use item_rel table and link it to item table for other end of link. You should provide only one question mark for current ITEM_ID. Communiware would rewrite query according to given parameters, such as linktype id, list of types of related items, etc (see QUALIFIED ATTRIBUTES SYNTAX in Communiware::Context documentation).

After pressing test button you can see how it is rewritten.

COOKIE ATTRIBUTE

Once you've created attribute, only thing you can change is its default value. Default value is value which is used if user browser haven't send cookie with this name. It is important to provide long description for cookie attribute becouse it would be used by standard User Preferences form.

16 октябрь 2007 13:45