Organizes common and helpful page template snippets that can be re-used for multiple web sites and themes.

Snippets include:

  • Display a warning message if a user is accessing a staging server.
  • Add log in/out to the footer message.
  • Add the current year to the footer's copyright message.
  • Adds the current theme's name, prefixed with 'theme-', to the page's $body_classes.
  • Add the user's roles, prefixed with 'role-', to the page's $body_classes.
  • Load css file based on the current path and active user's roles.
  • Template suggestions by path, role, and node type. - http://drupal.org/node/223440
Issues Related/Similar modules:

Functions

NameDescription
theme_helper_snippets_initImplementation of hook_init().
theme_helper_snippets_menuImplementation of hook_menu().
theme_helper_snippets_preprocess_nodeImplementation of hook_preprocess_node().
theme_helper_snippets_preprocess_pageImplementation of hook_preprocess_page().
_theme_helper_snippets_body_class_active_trailAdd active trails link attribute classes to $body_classes.
_theme_helper_snippets_body_class_roleAdd user's roles based class name to $body_classes.
_theme_helper_snippets_body_class_themeAdd theme based class name to $body_classes.
_theme_helper_snippets_css_suggestions_by_pathLoad css files based on the current path.
_theme_helper_snippets_css_suggestions_by_path_examplesGet examples of all css suggestion files for the current page.
_theme_helper_snippets_css_suggestions_by_roleLoad css files based on the active user's roles.
_theme_helper_snippets_css_suggestions_by_role_examplesGet examples of all css suggestion files for all roles.
_theme_helper_snippets_footer_copyright_yearReplace YYYY in the footer message with the current year.
_theme_helper_snippets_footer_loginAppend login link to the footer message.
_theme_helper_snippets_format_suggestionFormat an suggestion by removing special characters and spaces and optionally adding a prefix to the returned string.
_theme_helper_snippets_get_active_trail_infoGet active trail info, including mlids, nids, ids, and classes, in an associative array.
_theme_helper_snippets_has_staging_messageCheck if the current server is staging message and return the warning message.
_theme_helper_snippets_page_suggestions_by_classAdd template suggestions, to the $template_files array, for active trails menu item attribute classes.
_theme_helper_snippets_page_suggestions_by_idAdd template suggestions, to the $template_files array, for active trails menu item attribute ids.
_theme_helper_snippets_page_suggestions_by_pathAdd template suggestions, to the $template_files array, based on a node's alias.
_theme_helper_snippets_page_suggestions_by_path_examplesExamples of template suggestions based any path.
_theme_helper_snippets_page_suggestions_by_roleAdd template suggestions, to the $template_files array, based on the current user's roles.
_theme_helper_snippets_page_suggestions_by_role_examplesExamples of template suggestions for all user roles.
_theme_helper_snippets_staging_server_warningAdd staging message to page template variables.