You are here

function custom_breadcrumbs_help in Custom Breadcrumbs 7.2

Same name and namespace in other branches
  1. 6.2 custom_breadcrumbs.module \custom_breadcrumbs_help()
  2. 7 custom_breadcrumbs.module \custom_breadcrumbs_help()
  3. 1.x custom_breadcrumbs.module \custom_breadcrumbs_help()

Implements hook_help().

File

./custom_breadcrumbs.module, line 195
Main file for the Custom breadcrumbs.

Code

function custom_breadcrumbs_help($path, $arg) {
  switch ($path) {
    case 'admin/help#custom_breadcrumbs':
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t("This module allows you to create and modify breadcrumbs based on node type.") . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<p>' . t('Create and edit custom breadcrumbs from the <a href="@link">Custom Breadcrumb Administration Page</a>. Select the node type the breadcrumb will apply to. There are two text fields below-- <em>Titles</em> and <em>Paths</em>. When creating  a breadcrumb, you are simply creating a link. In the custom breadcrumbs interface <em>Titles</em> describes the text of the breadcrumb while <em>Paths</em> describes the Drupal path the breadcrumb links to. Each Title must have a corresponding Path.', array(
        '@link' => url('admin/structure/custom_breadcrumbs'),
      )) . '</p>';
      $output .= '<strong>' . t('Examples') . '</strong>';
      $output .= '<p>' . t("To give a very simple example of how to use this module, let's say I have a blog on my web site called 'Deep Thoughts.' To create this, I use the Views module to create a page at /blog that displays all the node types 'blog post.' Whenever a user views a blog post I want the breadcrumb to show Home > Deep Thoughts instead of simply Home. To do this I would simply type 'Deep Thoughts' in the 'Titles' field and and 'blog' in the 'Paths' field and save my breadcrumb.") . '</p>';
      $output .= '<p>' . t("Using tokens, the Custom breadcrumbs module becomes much more flexible because breadcrumbs can become dynamic. You can create a breadcrumb like Home > Deep Thoughts > [Month of Blog Post] [Year of Blog Post], where 'Deep Thoughts' links to my main blog page and '[Month of Blog Post] [Year of Blog Post]' links to a view that shows only blog posts from the month and year the blog post was created (e.g. June 2007). For this, you would do the following:") . '</p>';
      $output .= '<p>' . t("Node Type:<br />Blog Post<br /><br />Titles:<br />Deep Thoughts<br />[node:created:custom:M] [node:created:custom:Y]<br /><br />Paths:<br />blog<br />blog/[node:created:custom:m_Y]<br />(where of course, blog/[node:created:custom:m_Y] is the path to the view of blog posts from that month and year). So if you created a blog post on June 13, 2007 your breadcrumb would show Home > Deep Thoughts > June 2007 and 'June 2007' links to 'blog/06_2007' which is a view of all blog posts from June 2007.") . '</p>';
      $output .= '<p>' . t("Also, note that Custom Breadcrumbs doesn't actually check to be sure that a particular path exists, so you'll have to check yourself to avoid 404 errors.") . '</p>';
      $output .= '<p>' . t("Only users with 'administer custom breadcrumbs' permission will be allowed to create or modify custom breadcrumbs.") . '</p>';
      $output .= '<strong>' . t("Breadcrumb Visibility") . '</strong>';
      $output .= '<p>' . t("Users given 'use php in custom breadcrumbs' permission can include php code snippet that returns TRUE or FALSE to control whether or not the breadcrumb is displayed. Note that this code has access to the %node variable, and can check its type or any other property.", array(
        '%node' => '$node',
      )) . '</p>';
      $output .= '<strong>' . t("Special Identifiers") . '</strong>';
      $output .= '<p>' . t("Special identifiers are provided to achieve a special behavior:") . '</p>';
      $output .= '<p>' . t("The following identifiers can be used to achieve a special behavior. Identifiers should be added to the paths area in the following format:  identifier|path.<br />For example: %pathauto_id|[ogname-raw]", array(
        '%pathauto_id' => '<pathauto>',
      )) . '</p>';
      $output .= theme('custom_breadcrumbs_help_identifiers');
      return $output;
  }
}