xo::db::CrClass proc lookup (public)

 xo::db::CrClass[i] lookup -name name  [ -parent_id parent_id ] \
    [ -content_type content_type ]

Defined in /var/www/openacs.org/packages/xotcl-core/tcl/cr-procs.tcl

Check, whether a content item with the given name exists. When content_type is provided (e.g. -content_type "::%") then a like operation is applied on the value.

Switches:
-name (required)
-parent_id (optional, defaults to "-100")
-content_type (optional)
Returns:
item_id If the item exists, return its item_id, otherwise 0.

Testcases:
xotcl_core_tutorial_4, create_folder_with_page, xowiki_test_cases, path_resolve
[ show source ]
Show another procedure: