You are here

function outline_child_pages_link in Outline Designer 6.2

Same name and namespace in other branches
  1. 6 outline_child_pages/outline_child_pages.module \outline_child_pages_link()
  2. 7 outline_child_pages/outline_child_pages.module \outline_child_pages_link()

Implementation of hook_link().

File

modules/outline_child_pages/outline_child_pages.module, line 105

Code

function outline_child_pages_link($type, $node = NULL, $teaser = FALSE) {
  $links = array();

  // if this is a node link and has a book
  if ($type == 'node' && isset($node->book)) {

    // not viewing the teaser
    if (!$teaser) {

      // verify access
      if (_outline_child_pages_access($node, 'link')) {
        $links['book_outline_child'] = array(
          'title' => t('Outline child pages'),
          'href' => 'node/' . $node->nid . '/outline_children_link',
        );
      }
    }
  }
  return $links;
}