You are here

function context_field_help in Context Field 7

Implements hook_help().

File

./context_field.module, line 76
Context Field

Code

function context_field_help($path, $arg) {
  switch ($path) {
    case 'admin/help#context_field':
      $output = '';
      $output .= '<h3>' . t("About") . '</h3>';
      $output .= '<p>' . t("Context field provides users to select a context based on the value of a field for a given node type. This unlocks the power of context and allows content creators the ability to select which context is used for a given piece of content.  This allows non-technical site users the ability to accomplish anything normally accomplished by a context by selecting the context from a field.", array()) . '</p>';
      $output .= '<h3>' . t("Usage") . '</h3>';
      $output .= '<p>' . t("Go to <a href=@build>`admin/build/context/add`</a> and create a new context.  The name of the context will be what the user sees as the field value, so choose this name carefully.  To make a context available as a context field, select 'Context Field' from the list of conditions and check the first checkbox.  The second checkbox makes the context available as a default field value.  Finally, the category text field allows contexts to be separated into categories and will allow different groups of contexts to work in different fields.", array(
        '@build' => '../../admin/structure/context/add',
      )) . '<p>';
      $output .= '<p>' . t("After creating the desired contexts, create the context field for the desired content type and select `Context` as the field type,  select an appropriate widget and save the field. Enter the relevant category and select the default context.") . '</p>';
      $output .= '<h4>' . t("Basic example") . '</h4>';
      $output .= '<p>' . t("To borrow from the example used in <a href=@context>context</a>, with context field enabled, adding nodes to the pressroom would be as simple as marking the context field `Newsroom` and hitting save.  This would fire the newsroom context instead of, for example, the blog context.  This would eliminate the need to have designated node types for newsroom and blogs simply to fire a given context.", array(
        '@context' => '/admin/help/context',
      )) . '</p>';
      $output .= '<h3>' . t("Resources") . '</h3>';
      $output .= '<p>' . t("Besides the documentation on the context field <a href='@project_page'>project page</a>, there's a blog post by one of the module authors that provides a more <a href='@agile_approach'> in-depth example.</a>", array(
        '@project_page' => 'http:// drupal.org/project/context_field',
        '@agile_approach' => 'http:// www.agileapproach.com/blog-entry/context-field',
      )) . '</p>';
      return $output;
  }
}