Editing an Item Editing Content

11-14 Oracle Fusion Middleware Developers Guide for Oracle Portal ■ Section 11.3.1, Moving an Item to a Different Page ■ Section 11.3.2, Moving Pages

11.3.1 Moving an Item to a Different Page

You can use the move_item API to move an item to a different page in the same page group or to a page in a different page group. Moving an item preserves the items metadata. To move an item to a different page group, the item must not be: ■ based on a local item type. ■ associated with a local category. ■ associated with any local perspectives. Example 11–6 moves an item from one page group to a page in a different page group. Example 11–6 Moving an Item to a Different Page Group move_item API begin wwsbr_api.move_item p_caid = 33, p_master_item_id = 12345, p_dest_caid = 53, p_dest_page_id = 1, p_dest_region_id = 5 ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; ■ p_caid is the ID of the page group to which the item currently belongs. ■ p_master_item_id is the master ID of the item that you want to move. ■ p_dest_caid is the ID of the page group to which you want to move the item. ■ p_dest_page_id is the ID of the page to which you want to move the item. ■ p_dest_region_id is the ID of the item region of the page in which you want to move the item. If you do not specify a region ID, the item is moved to the pages default item region, which may not be desirable.

11.3.2 Moving Pages

You can use the move_folder API to move a page within the same page group. You cannot move a page to a different page group. To move a page, users must have Manage privileges on the page being moved and the page under which the page is being moved. Example 11–7 shows how to move a page. Example 11–7 Moving a Page move_folder API begin wwsbr_api.move_folder p_id = 12345, p_siteid = 33, Performing Simple Content Management Tasks 11-15 p_parent_id = 10000 ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; ■ p_id is the ID of the page that you want to move. ■ p_siteid is the ID of the page group to which the page belongs. ■ p_parent_id is the ID of the page under which you want to move the page.

11.3.3 Moving Categories and Perspectives

You can, if necessary, move categories and perspectives around within a page group. You cannot move a category or perspective to a different page group. To move a category or perspective, a user must have Manage Classifications privileges or higher on the owning page group. To move a category, use the move_category API, as shown in Example 11–8 . Example 11–8 Moving a Category move_category API begin wwsbr_api.move_category p_src_id = 2000, p_dest_id = 3000, p_siteid = 33 ; exception ... end; To move a perspective, use the move_perspective API, as shown in Example 11–9 . Example 11–9 Moving a Perspective move_perspective API begin wwsbr_api.move_perspective p_src_id = 2000, p_dest_id = 3000, p_siteid = 33 ; exception ... end; ■ p_src_id is the ID of the category or perspective that you want to move. ■ p_dest_id is the ID of the category or perspective under which you want to move the category or perspective. ■ p_siteid is the ID of the page group to which the category or perspective belongs.