function menu_trail_by_path_help in Menu Trail By Path 8
Implements hook_help().
File
- ./
menu_trail_by_path.module, line 16 - Expand menu items and set active-trail according to current path.
Code
function menu_trail_by_path_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the menu_trail_by_path module.
case 'help.page.menu_trail_by_path':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Menu Trail By Path sets the active-trail on menu items according to the current url.') . '</p>';
$output .= '<h3>' . t('How it works') . '</h3>';
$output .= '<p>' . t('For example if you are at yoursite.com/blog/category1/article1</br>Menu Items with these paths will get the active-trail class on them and expand accordingly.') . '</p>';
$output .= '<p>' . t('blog</br>blog/category1</br>blog/category1/article1') . '</p>';
$output .= '<p>' . t('This is particularly useful if you want a lot of nodes to appear as children of certain nodes / taxonomy term / views / referenced nodes / etc, but do not want to add them all to the menu. eg. hundreds of blog articles.') . '</p>';
$output .= '<p>' . t('Menu Trail By Path is best used in conjunction with <a target="_blank" href="@link">Pathauto</a>.', [
'@link' => 'https://www.drupal.org/project/pathauto',
]) . '</p>';
return $output;
default:
return '';
}
}