Creating new Widgets


Creating a New Category Widget

Creating a new Category Widget requires an integration between the OpenACS "Categories" package and DynField:

  1. You have to create a new Category tree for the widget (if it doesn't exist already). Go to the category admin pages at /categories/cadmin/ and select "Create a new tree". Let's call it "Customer Classification" and press OK.
  2. Select the new tree and choose "Add node at top level" to give it its root node. Let's call the root node "No Classification" and press OK
  3. Now you can successifly add sub-categories to "No Classification" by clicking on the "Add child" link. For example we might add the sub classifications "A" (= great customer), "B" (= ok customer) and "C" (= customer to get rid of)
  4. Finally on the category part, we have to find out the "tree_id" of the current tree. To do this, please check the current URL for a "tree_id" piece, which is followed by a number. Perhaps "tree_id" is written as "tree%5fid=630", with the "%5f" representing the underscore "_". However, we need the number behind the "=", so the 630 in this example.
  5. Now let's go to /dynfield/widgets/ and select "Create a new widget" link at the bottom.
  6. Let's enter the following data:
    • Widget Name = "customer_classification"
    • Pretty Name = "Customer Classification"
    • Pretty Plural = "Customer Classifications"
    • Storage Type = "Normal Value"
    • ACS Datatype = "Integer"
    • Widget = "Category"
    • Datatype = "Integer" and
    • Paremeters = "{custom {category_tree_id 630}}" (please replace the 630 by your tree_id)
  7. That's it. Now you have a new "customer_classification" widget that is available when you define new attributes of an object.

 

  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

08902 Hospitalet de Llobregat (Barcelona)

Spain

 Tel Europe: +34 609 953 751
 Tel US: +1 415 200 2465
 Mail: info@project-open.com