Template Tags / getPages()

Description

Returns an array of all pages so that you can do fun things like generate your own menu HTML.

Example output:

array( 
	0 => array( 
		'id' => 1, 
		'name' => 'Tribute', 
		'slug' => 'tribute', 
		'url' => '', 
		'text' => 'Secretary wins all the awards in my eyes.', 
		'content_type' => 'projects', 
		'content_options' => 'show= big', 
		'hidden' => 0, 
		'parent' => 0, 
		'pos' => 0 
	), 
	1 => array( 
		'id' => 2, 
		'name' => 'About', 
		'slug' => 'about', 
		'url' => '', 
		'text' => 'I am me. Who is me? You are me.', 
		'content_type' => 'none', 
		'content_options' => '', 
		'hidden' => 1, 
		'parent' => 0, 
		'pos' => 1 
	) 
)

Usage

<?php 
	$pages= getPages(); 
?>

Examples

<?php 
	$pages= getPages(); 
	foreach ( $pages as $page ): 
		echo $page['name']; 
		echo pageName(); // template tags only work if you set the variable $page in the loop 
		// Other crazy shit... 
	endforeach; 
?>