cr::keyword::item_assign (public, deprecated)

 cr::keyword::item_assign -item_id item_id -keyword_id keyword_id \
    [ -singular ]

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

Deprecated. Invoking this procedure generates a warning.

Assign one or more keywords to a content_item.

Switches:
-item_id (required)
-keyword_id (required)
A list of keywords to assign.
-singular (optional, boolean)
If singular is specified, then any keywords with the same parent_id as this keyword_id will first be unassigned.
Returns:
the supplied item_id for convenience.
See Also:

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc cr::keyword::item_assign
    # First, unassign for the parents of each/all
    if {$singular_p} {
        foreach keyword $keyword_id {
            set parent_id [db_string get_parent_id {
                select parent_id
                from cr_keywords
                where keyword_id = :keyword
            }]
            item_unassign_children -item_id $item_id -parent_id $parent_id
        }
    }

    # Now assign for each/all
    foreach keyword $keyword_id {
        db_exec_plsql keyword_assign {}
    }

    return $item_id
Generic XQL file:
packages/acs-content-repository/tcl/deprecated-procs.xql

PostgreSQL XQL file:
<fullquery name="cr::keyword::item_assign.keyword_assign">
    <querytext>
            select content_keyword__item_assign(
                :item_id,
                :keyword,
                null,
                null,
                null
            )
        </querytext>
</fullquery>
packages/acs-content-repository/tcl/deprecated-procs-postgresql.xql

Oracle XQL file:
<fullquery name="cr::keyword::item_assign.keyword_assign">
    <querytext>
            begin
              content_keyword.item_assign(
                :item_id,
                :keyword,
                null,
                null,
                null
              );
            end;
        </querytext>
</fullquery>
packages/acs-content-repository/tcl/deprecated-procs-oracle.xql

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