Neighborhood Navigation™ Demo

Intro | Example 1 | Example 2 | Example 3 | Example 4 | Example 5 | Readme

Sample Header #40 | Example 6

Neighborhood Navigation tm Readme:-

Configuration and setup:-

	NN files with the .incl extention are designed to be modified.
	
	Open the NNConfig.incl file and customize as required.
	
	Open the NNCommon.incl file and populate the $nnNbhdUrlHdrs array with each directory and or subdomain used in your site, and assign a language code to each.
	
	Clone a copy of NNDirectory_<langcode>.incl for each language split you are using on your site and build the following three arrays in each:
		$nnCallItems
		$nnJSHrefs
		$nnNavItems
		
	You will find more information w/in each .incl file

Usage:-
	
	Each of your pages that will use Neighborhood Navigation functionality needs to <?include('<path/to/script/>NNConfig.incl');?>
	
	The Neighborhood Navigation class's default action is to do nothing but to configure itself, and then load and build the configuration arrays which describe your Neighborhood Navigation website.
	
	Once the class is loaded/defined in the calling script, you can instantiate it with an object name thus: 
			$nnpage = new Neighborhood_Navigation_Page();
	(note that $nnpage is the sample object name used throughout the documentation)
	
	At this point, you have access to all of the public functions and loaded arrays as described below.
	
	You can modify this default instantiation action by passing the parameter value TRUE to the classes object constructor function thus:	
		$nnpage = new Neighborhood_Navigation_Page(true);
		
	In this case, the $nnpage->nnDirectory variable will be built, complete with a wrapper container so that you can simply plug the generated markup into your page.
	
	The $nnpage->nnDirectory variable includes the results of nnDoStatic(), nnDoActivNeighborhood(), nnDoNeighborhoodHeaders(),
		nnDoNeighborhoodTrailers(), and nnCredit() in that order, and includes the appropriate $nnpage->nnCallItems[] values in the logical places.
		
	In addition, the $nnpage->nnTourBar will be created for the current neighbornood if any $nnNavItems items have been defined as a tourbar link.
	
	This default version of $nnpage->nnTourBar also includes a wrapper container and includes the $nnpage->nnCallItems['Tur'] value as it's legend.
	
	You will still need to <?=$nnpage->nnDirectory;?> and <?=$nnpage->nnTourBar;?> at the appropriate places in your page.
	
	Neighborhood Navigation also has public functions that you can call to build your navigation al'a carte'.
	
	Al'a Carte' Methods/functions include:

		$nnpage->nnDoDirectory() -defaults to true to return result or accepts false to function just like the instantiation override described above
		                                                           -accepts addon markup in the 2nd param.

		$nnpage->nnDoStatic() -defaults to true to return result or accepts false to add result to $nnpage->nnDirectory
		
		$nnpage->nnDoActivNeighborhood() -defaults to true to return result or accepts false to add result to $nnpage->nnDirectory
		
		$nnpage->nnDoNeighborhoodHeaders() -defaults to true to return result or accepts false to add result to $nnpage->nnDirectory
		
		$nnpage->nnDoNeighborhoodTrailers() -defaults to true to return result or accepts false to add result to $nnpage->nnDirectory
		
		$nnpage->nnDoSingleNavItem($nnNavItems Key, optional override link text) //accepts 2 params
			-this one is very convenient when you want to include a single page link somewhere.
			-returns a marked up link based on the values of the $nnNavItems item identified by the passed Key
			-elegantly handles javascript calls and includes the spider friendly href= part too.
		
		$nnpage->nnDoNeighborhoodTour() -defaults to true to return result or accepts false
		
		$nnpage->nnDoSiteMap() -accepts 0 params and always returnes the site map markup string
		
	Example returned result:
		<?=$nnpage->nnDoActivNeighborhood();?>	or <?$ActivBlock = $nnpage->nnDoActivNeighborhood();?>
	Example stacked result:
	<?$nnpage->nnDoActivNeighborhood(false); $nnpage->nnDoNeighborhoodTrailers(false); echo $nnpage->nnDirectory;?>
			
	You also have access to the following page relavent variables as were defined in the $nnNavItems array in the NNDirectory_<langcode>.incl include file:
		
		$nnpage->$nnPageTitle;
	
		$nnpage->$nnMetaDescription;
	
		$nnpage->$nnMetaKeywords;
		
	Use these in the <head></head> or <body></body> sections of your pages as desired. for instance:
		<head>
		<title><?=$nnpage->nnPageTitle;?></title>
		.		.		.
		<meta name="description" content="<?=$nnpage->nnMetaDescription;?>" />
		<meta name="keywords" content="<?=$nnpage->nnMetaKeyWords;?>" />
		</head>
		<body>
		<h1><?=$nnpage->nnPageTitle;?></h1>
		.		.		.
		</body>
		
	Again, see the NNSampleUsage.incl for more examples.

Styling:-

	All of Neighborhood Navigation's 'layout' and styling is defined in the NNStyles.css CSS2 external stylesheet.
	NN is distributed with the LV Stardust theme, which is a vertical theme.
	Through only stylesheet changes and module placements, you should be able to create an installation that suites your needs - even vertically formatted.
	If you haven't already, do check out the demo using the FireFox browser.
	ahr welcomes submission of additional themes for Neighborhood Navigation.

ahr's Neighborhood Navigation™

Get it (core files) » .zip .tar.gz

Get it (with full demo) » .zip .tar.gz

You may also find ahr scripts on:

Scripts.com

Rate our program!