You are here

function ctools_page_title_content_type_token in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/content_types/page/page_title.inc \ctools_page_title_content_type_token()

Variable token callback to properly render the page title, with markup.

1 string reference to 'ctools_page_title_content_type_token'
ctools_page_title_content_type_render in plugins/content_types/page/page_title.inc
Output function for the 'page_title' content type.

File

plugins/content_types/page/page_title.inc, line 108
Plugin to handle the 'page' content type which allows the standard page template variables to be embedded into a panel.

Code

function ctools_page_title_content_type_token(&$variables, $tag, $id, $class) {
  if ($tag == 'none') {
    return drupal_get_title();
  }
  $output = '<' . $tag;
  if ($id) {
    $output .= ' id="' . $id . '"';
  }
  if ($class) {
    $output .= ' class="' . $class . '"';
  }
  $output .= '>' . drupal_get_title() . '</' . $tag . '>' . "\n";
  return $output;
}