Customize the Organize Browser

Customize the toolbar and context menu in the Organize browser.

There are also custom actions for typical lifecycle operations. These can be either pre or post of typical lifecycle operations.
Note: The custom scripts are recommended to be placed in a folder as declared in the libraryprofile.xml file.

Toolbar Customization

The core application expects a return value of one to show the toolbar from a procedure named ::namespace::ShowHideCustomToolbar. A return value of zero will hide the toolbar. You can use the standard hwt commands to create label combinations or icons to do specific jobs.

Context Menu Customization

The core application runs the procedure ::namespace::CtxMenuAddCustomItems to add the custom context menus. The arguments objBrowser, menu and obj values are passed to this procedure by core.

Custom Actions

The following are the exposed hook ups for pre and post actions. All of the below procedures should be under one .tcl file, as recommended.
::namespace::OnLoad
This procedure will be called as the entry point of the module as declared in the libraryprofile.xml.
::namespace::OnUnLoad
This procedure will be called when you change to a different library or the module is unloaded.
:namespace:: OnChangeWorkspace
This procedure is called when you change the current workspace.
::namespace:: OnChangeLibrary
This procedure is called when you change the current library. If the new library is using a different profile then ::namespace::OnLoad is also called.
::namespace:: OnContentCheckIn_Pre
This procedure is called before content is checked into the library.

Arguments

gdm
Generic data manager handle.
ci
Content interface handle.

The above arguments are passed from the core.

Return values:
0 or “ ”
Will continue Check-In operation.
1
Will abort Check-In operation. For example, if you have not provided certain information or a certain metadata value extraction fails.
::namespace:: OnContentCheckIn_Post
This procedure is called after content is checked into the library.
Return values: None
:namespace:: OnContentCheckOut_Pre
This procedure is called before content is checked out from the library.
Return values:
0 or “ ”
Will continue Check-Out operation.
1
Will abort Check-Out operation.
::namespace:: OnContentCheckOut_Post
This procedure is called after content is checked out from the library.
Return values: None
::namespace:: OnContentUndoCheckOut_Pre
This procedure is called before the Undo Check-Out operation.
Return values:
0 or “ ”
Will continue Check-Out operation.
1
Will abort Check-Out operation.
::namespace:: OnContentUndoCheckOut_Post
This procedure is called after the Undo Check-Out operation.
Return values: None
::namespace:: OnContentGet_Pre
This procedure is called before the Get operation.
Return values
0 or “ ”
Will continue Get operation.
1
Will abort Get operation.
2
Operation is implemented in custom refresh proc.
::namespace:: OnContentGet_Post
This procedure is called after the Get operation.

Return values: None