hObjectDisplay

Modify the object display page by adding extra user interface which provides access to the functionality of your plugin.

Use the backLink and backLinkText responses with caution. Note their names are to match view rendering, and not indicative of their purpose. Because users are expected to browse through the objects in an explorative and unguided manner, there is no real concept of ‘back’.

You should only use backLink where there is a obvious object that the user is likely to visit next. You should set the backLinkText to a noun which describes where the link goes. For example, if a file was considered ‘attached’ to a project, you might link to the project object with the text “Project”.

Use Elements to add additional information and user interface to an object.

Arguments

Name Type Description
object StoreObject The object being displayed

Response

Return information by changing these properties of the response object.

Name Type Description
hideModificationInfo boolean Set to true to hide the modification info after the object
buttons Object (as dictionary) Hash of String (button name) to Array of [url_path,menu_text] for the menu
backLink String Link for the ‘back’ button for this object. Use with caution.
backLinkText String Label for the ‘back’ button for this object. Always use a noun describing the item you’re linking to.

JavaScript template


P.hook('hObjectDisplay', function(response, object) {
    // Respond to hook, for example
    // response.hideModificationInfo = ...
});