content::keyword::item_get_assigned (public)

 content::keyword::item_get_assigned -item_id item_id \
    [ -parent_id parent_id ]

Defined in packages/acs-content-repository/tcl/content-keyword-procs.tcl

Returns a list of all keywords assigned to the given cr_item. If parent_id is supplied, only keywords that are children of parent_id are listed.

Switches:
-item_id (required)
-parent_id (optional)

Testcases:
No testcase defined.
Source code:
    if {[info exists parent_id]} {
        set keyword_list [db_list get_child_keywords {
            select km.keyword_id
            from cr_item_keyword_map km,
                 cr_keywords kw
            where km.item_id = :item_id
            and   kw.parent_id = :parent_id
            and   kw.keyword_id = km.keyword_id
    }]
    } else {
        set keyword_list [db_list get_keywords {
            select keyword_id from cr_item_keyword_map
            where item_id = :item_id
    }]
    }

    return $keyword_list
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: