function farm_ui_view_page_path in farmOS 7
Helper function for getting the path to a View's page display.
Parameters
string $view_name: The machine name of the View.
string $display: The machine name of the page display (defaults to "page").
Return value
string Returns the path to a View's page display.
3 calls to farm_ui_view_page_path()
- farm_ui_area_links in modules/
farm/ farm_ui/ farm_ui.farm_area.inc - Generate area links for farm_asset or log entity types.
- farm_ui_entity_type_breadcrumb in modules/
farm/ farm_ui/ farm_ui.breadcrumb.inc - Build breadcrumbs for a specific entity type and bundle.
- farm_ui_farm_metrics in modules/
farm/ farm_ui/ farm_ui.farm_metrics.inc - Implements hook_farm_metrics().
File
- modules/
farm/ farm_ui/ farm_ui.module, line 319 - Farm UI module code.
Code
function farm_ui_view_page_path($view_name, $display = 'page') {
// Load the View.
$view = views_get_view($view_name);
// If the page display exists and has a path, return it.
if (!empty($view->display[$display]->display_options['path'])) {
return $view->display[$display]->display_options['path'];
}
// Otherwise, return an empty string.
return '';
}