content::get_folder_labels (public, deprecated)
content::get_folder_labels [ varname ]
Defined in packages/acs-content-repository/tcl/deprecated-procs.tcl
Deprecated. Invoking this procedure generates a warning.
Set a data source in the calling frame with folder URL and label Useful for generating a context bar. This function returns a hard-coded name for the root level. One should use for path generation for items the appropriate API, such as e.g. content::item::get_virtual_path
- Parameters:
- varname (optional, defaults to
"folders")- See Also:
- Testcases:
- No testcase defined.
Source code: ad_log_deprecated proc content::get_folder_labels variable item_id # this repeats the query used to look up the item in the first place # but there does not seem to be a clear way around this # build the folder URL out as we iterate over the query set query [db_map get_url] db_multirow -extend {url} $varname ignore_get_url $query { append url "$name/" }Generic XQL file: packages/acs-content-repository/tcl/deprecated-procs.xql
PostgreSQL XQL file: <fullquery name="content::get_folder_labels.get_url"> <querytext> With RECURSIVE child_items AS ( select 0 as lvl, i.item_id, ''::text as name, i.parent_id, 'Home'::text as title from cr_items i, cr_revisions r where i.item_id = :item_id and i.live_revision = r.revision_id UNION ALL select child_items.lvl+1, i.item_id, i.name, i.parent_id, r.title from cr_items i, cr_revisions r, child_items where i.parent_id = child_items.item_id and i.live_revision = r.revision_id ) select * from child_items; </querytext> </fullquery>packages/acs-content-repository/tcl/deprecated-procs-postgresql.xql
Oracle XQL file: <fullquery name="content::get_folder_labels.get_url"> <querytext> select 0 as tree_level, '' as name , 'Home' as title from dual UNION select t.tree_level, i.name, content_item.get_title(t.context_id) as title from ( select context_id, level as tree_level from acs_objects where context_id <> content_item.get_root_folder connect by prior context_id = object_id start with object_id = :item_id ) t, cr_items i where i.item_id = t.context_id order by tree_level </querytext> </fullquery>packages/acs-content-repository/tcl/deprecated-procs-oracle.xql