You are here

function express_back_to_top_preprocess_page in Express 8

Preprocess theme variables for a specific theme hook.

This hook allows modules to preprocess theme variables for a specific theme hook. It should only be used if a module needs to override or add to the theme preprocessing for a theme hook it didn't define.

For more detailed information, see theme().

Parameters

array $variables: The variables array (modify in place).

File

modules/custom/express_back_to_top/express_back_to_top.module, line 39
Back to top.

Code

function express_back_to_top_preprocess_page(&$variables) {
  $variables['#attached'][library][] = 'express_back_to_top/express-back-to-top';
  $variables['page']['content']['back_to_top']['#markup'] = '<div id="express_back_to_top"><a href="#page" title="Back to Top">Back to Top</a></div>';

  //var_dump($variables['page']);
}