You are here

function paging_fetch_names in Paging 7

Same name and namespace in other branches
  1. 6 paging.module \paging_fetch_names()

Return an array of page names for a node.

Parameters

$nid: Either the nid of the node or the node object itself.

Return value

An array of page names found in the node body.

2 calls to paging_fetch_names()
paging_build_names in ./paging.module
Returns a rendered list of page links.
paging_node_view in ./paging.module
Implements hook_node_view().

File

./paging.module, line 508
Allows a node to be broken into multiple pages via a tag.

Code

function paging_fetch_names($nid) {
  if (is_numeric($nid)) {
    $node = node_load($nid);
    $body = paging_fetch_body($node);
    preg_match("/<!--pagenames:(.*?)-->/", $body, $matches);
    if (count($matches) > 0) {
      return explode('||', $matches[1]);
    }
  }
  return array();
}