function _custom_breadcrumbs_construct_view_path in Custom Breadcrumbs 7.2
Same name and namespace in other branches
- 6.2 custom_breadcrumbs_common.inc \_custom_breadcrumbs_construct_view_path()
Constructs the view path replacing wildcards with arguments.
Parameters
object $display: The view $display object.
Return value
viewpath The complete path to the view.
3 calls to _custom_breadcrumbs_construct_view_path()
- custom_breadcrumbs_paths_views_pre_render in custom_breadcrumbs_paths/
custom_breadcrumbs_paths.module - Implements hook_views_pre_render().
- custom_breadcrumbs_taxonomy_views_pre_render in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module - Implements hook_views_pre_render().
- custom_breadcrumbs_views_views_post_render in custom_breadcrumbs_views/
custom_breadcrumbs_views.module - Implements hook_views_post_render().
File
- ./
custom_breadcrumbs_common.inc, line 39 - Common helper functions used by custom breadcrumbs submodules.
Code
function _custom_breadcrumbs_construct_view_path($display) {
// @todo changes needed for D7?
$bits = explode('/', $display->display_options['path']);
$args = arg();
foreach ($bits as $pos => $bit) {
if (!empty($args)) {
$arg = array_shift($args);
if ($bit == '%') {
$bits[$pos] = $arg;
}
}
}
if (!empty($args)) {
// Add any additional arguments to end of path.
$bits = array_merge($bits, $args);
}
$viewpath = implode('/', $bits);
return $viewpath;
}