Installation & Database Setup

The Custom Tag

When you have access to the servers custom tag folder, you could put the file dbtree.cfm there. In that case, just call DBTree like this:

<cf_dbtree
instancename="..." ..

This method works well for all functions of DBTree except for drag&drop editing the tree wich uses Ajax.

In the majority of cases, where you have a shared hosting account, you simple put dbtree.cfm somewhere in your site, and then call it with cfmodule. This is also the recommended method, because for the advanced edit mode, you must call the tag with cfmodule.

<cfmodule template="dbtree.cfm"
instancename="..." ..

The javascript file dbtree.js, if required, can be placed whereever you like.

Database

Minimum requirements for the Database table

Fieldname Datatype Description
[fieldname] Number, auto increment The ID of the record. Primary key
[fieldname] Number The parent ID of the record, 0 if toplevel
sortorder Number Position in its branch, beginning with 1
[fieldname] Text, Number, Date/Time, etc. Additional fields. You can choose the names yourself

Additional fields can be added like you wish..

 

Add your comment to this page Add Comment
Join for a free account, or login if you are already a member.