category_tree::get_id_by_object_title (public)

 category_tree::get_id_by_object_title [ -title title ]

Defined in packages/categories/tcl/category-trees-procs.tcl

Gets the id of a category_tree given an object title (object_type=category). This is highly useful as the category_tree object title will not change if you change the name (label) of the category_tree, so you can access the category_tree even if the label has changed. Why would you want this? E.g. if you have the category widget and want to get only one specific tree displayed and not all of them.

Switches:
-title
(optional)
object title of the category to retrieve
Returns:
the category_tree_id or empty string if no category was found
Author:
Malte Sussdorff <malte.sussdorff@cognovis.de>

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_tree_procs category_tree_procs (test categories) category_tree::get_id_by_object_title category_tree::get_id_by_object_title test_category_tree_procs->category_tree::get_id_by_object_title db_string db_string (public) category_tree::get_id_by_object_title->db_string

Testcases:
category_tree_procs
Source code:
        return [db_string get_tree_id {
            select object_id
            from acs_objects
            where title = :title
            and object_type = 'category_tree'
        } -default ""]
XQL Not present:
Generic
PostgreSQL XQL file:
packages/categories/tcl/category-trees-procs-postgresql.xql

Oracle XQL file:
packages/categories/tcl/category-trees-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: