function hook_workbench_content_alter in Workbench 7
Same name and namespace in other branches
- 8 workbench.api.php \hook_workbench_content_alter()
Allows modules to alter the default Workbench landing page.
This hook is a convenience function to be used instead of hook_page_alter(). In addition to the normal Render API elements, you may also specify a #view and #view_display attribute, both of which are strings that indicate which View to render on the page.
The left and right columns in this output are given widths of 35% and 65% respectively by workbench.my-workbench.css.
Parameters
$output: A Render API array of content items, passed by reference.
See also
1 invocation of hook_workbench_content_alter()
- workbench_content in ./
workbench.pages.inc - Page callback for the workbench content page.
File
- ./
workbench.api.php, line 24 - API documentation file for Workbench.
Code
function hook_workbench_content_alter(&$output) {
// Replace the default "Recent Content" view with our custom View.
$output['workbench_recent_content']['#view'] = 'custom_view';
$output['workbench_recent_content']['#view_display'] = 'block_2';
}