function floating_block_help in Floating block 8
Same name and namespace in other branches
- 6 floating_block.module \floating_block_help()
- 7 floating_block.module \floating_block_help()
Implements hook_help().
File
- ./
floating_block.module, line 25 - The floating_block module allows parts of the site to stay on the page when scrolling.
Code
function floating_block_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.floating_block':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Floating block module allows you to keep html blocks, selected using jquery selectors in a fixed position on the page as you scroll. It works in a similar way the table header fixer in Drupal Core. This means that when the user scrolls their browser selected parts of the page can stay in the users view. This is extremely useful when you have pages with lots of content and you want a side menu to stay in view.') . '</p>';
return $output;
case 'floating_block.admin_settings':
$output = '<h3>' . t('How to configure a floating block') . '</h3>';
$output .= '<p>' . t('Use the textbox below a floating block configurations, one per line. See below for example configurations:') . '</p>';
$output .= '<dl>';
$output .= '<dt>' . t('<code>#sidebar-left</code>') . '</dt>';
$output .= '<dd>' . t('Using the jQuery selector #sidebar-left float the left sidebar. The selector will depend on your chosen theme. The selector can be any valid <a href="@jquery_selector_url">jQuery selector</a>.', array(
'@jquery_selector_url' => 'http://api.jquery.com/category/selectors/',
)) . '</dd>';
$output .= '<dt>' . t('<code>#sidebar-left|padding_top=8,padding_bottom=4</code>') . '</dt>';
$output .= '<dd>' . t('Float the left sidebar. Once the block is floating the top will be offset 8px from the top of the page and if the floating block comes near the bottom of the page it will be offset 4px from the bottom of the page.') . '</dd>';
$output .= '<dt>' . t('<code>#sidebar-left|container=#main</code>') . '</dt>';
$output .= '<dd>' . t('Float the left sidebar within a container in your theme called <code>#main</code>') . '</dd>';
return $output;
}
}