Projet

Général

Profil

Paste
Télécharger (1,12 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / ctools / plugins / content_types / page / page_secondary_links.inc @ 6e3ce7c2

1
<?php
2

    
3
/**
4
 * @file
5
 * Plugin to handle the 'page' content type which allows the standard page
6
 * template variables to be embedded into a panel.
7
 */
8

    
9
/**
10
 * Plugins are described by creating a $plugin array which will be used
11
 * by the system that includes this file.
12
 */
13
$plugin = array(
14
  'title' => t('Secondary navigation links'),
15
  'single' => TRUE,
16
  'icon' => 'icon_page.png',
17
  'description' => t('Add the secondary_links (local tasks) as content.'),
18
  'category' => t('Page elements'),
19
  'render last' => TRUE,
20
);
21

    
22
/**
23
 * Output function for the 'page_secondary_links' content type.
24
 *
25
 * Outputs the secondary_links (local tasks) of the current page.
26
 */
27
function ctools_page_secondary_links_content_type_render($subtype, $conf, $panel_args) {
28
  $block = new stdClass();
29
  $block->content = theme('links', array('links' => menu_secondary_menu(), 'attributes' => array('class' => 'links secondary-links')));
30

    
31
  return $block;
32
}
33

    
34
/**
35
 * Returns an edit form for custom type settings.
36
 */
37
function ctools_page_secondary_links_content_type_edit_form($form, &$form_state) {
38
  // Empty so that we can have title override.
39
  return $form;
40
}