[ xmlSE . how to . create a new category ] edit

To create a new category, go to the configure site page. Follow the 'new' link next to the category heading.

Enter your name and password at the prompt.

In the 'name' field, enter the name of the new category. The name should not include any spaces or special characters.

The 'member' field has three subfields, 'type', 'title' and 'user'. The 'type' subfield is required. Enter the singular name of a member of the category. For example, a member of the people category is a person. If you want records in this category to have titles, enter the name of the title in the 'title' subfield. The title for a person record is 'name'. Enter 'true' in the 'user' subfield if records in this category represent users that should have passwords to access the site.

The 'sort' field controls the way records in the category are sorted. Enter the field whose contents you want to sort the records by in the 'field' subfield. In the 'type' field you should enter which sorting algorithm you would like to use. The options are 'cmp', 'last' or 'date'. The 'cmp' algorithm compares the contents of the field alphabetically or numerically. The 'last' algorithm is the same as 'cmp' except it compares only the last word in the string. The 'date' algorithm sorts the records by date, when the field mentioned in 'field' has the attributes 'month', 'day', and 'year' and they are in 'mm.dd.yyyy' format. So if you wanted to sort the people category by last name you would put 'name' in the 'field' subfield and 'last' in the 'type' subfield. To sort people by their phone area code you put 'contact.phone.area_code' in 'field' and 'cmp' in 'type'. To sort people according to when their records were last edited you put 'last_edited' in 'field' and 'date' in 'type'. The 'direction' subfield can have either '1' for forwards or '-1' for backwards. Try putting a '1' first, and if that does not give the desired results come back and change it to '-1'.

When you hit the 'create' button, a new dtd and xml file will be generated for the category in the 'xmlSiteEngine/system/xml/' directory.

After you create a new category you will also have to create an index template, create a record template, and create a reference template for each browser version of the site.

last updated 3.5.2002 by administrator