Method: getPage($type , $order , $num_results_per_page , $page , [$refresh])

Returns an array for page $page of nav links. Each array item will be an InvNavLink object.

Arguments:

$type (ENUM)
- all: All documents or nodes included in this node.
- allbaseonly: All documents or nodes which have this node as their base node.
- document: Documents included within this node.
- documentbaseonly: Just documents which have this node as their base node.
- node: Just nodes which are immediate children of this node

$order (STRING)
Sort order for this page of links eg 'document_title' , 'document_published'

num_results_per_page (INT)
Number of links to show in each page of this nav.

page (INT)
Page of nav to show

$refresh (BOOL default: false)
If $refresh=true, the method refreshes the nav object's internal cache from the database first.

Returns:

OBJECT consisting of:
$response->links = ARRAY of InvLink OBJECTs
$response->pagination = ARRAY of nav pagination links

Example:

// Get first page of 30 links in title order
$nodenav->getPage('document' , 'document_title' , 30 , 1);

// Get first page of 10 links in descending date order (most recent first)
$nodenav->getPage('document' , 'document_expirydate DESC' , 10 , 1);

Example 2:

if($nodenav = $this->getNodeNav($this->document->currentnode->id)){
	foreach($nodenav->getPage('all' , 'document_title' , 30 , 1)->links as $link){
		echo $link->getTitle();
	}
}

Contact Us

Address: 22a Fishergate York, YO10 4AB · Tel: 01904 636677 · Email: info@dotadmin.com