modifying the breadcrumb bar items in a boost-based theme (3.6.4)

Re: modifying the breadcrumb bar items in a boost-based theme (3.6.4)

by Darko Miletić -
Number of replies: 0
Just operate on navbar before passing it over to render method.
Here are some examples:
// For example if you have a node with keyname foo and wanna add something to it's text.
$node = $PAGE->navbar->get('foo');
if ($node) {
$node->text .= ' adding text';
}

// If you wanna change all nodes.
foreach ($PAGE->navbar->get_items() as $node) {
/** @var navigation_node $node */
$node;
$node->text .= ' aaaa';
}


Average of ratings: Useful (2)