Recommended Links
Common For all pages
This section shows you how you can have editable content which is the same throughout the site ( NOTE: It is language specific ) .All the navs below are generated using snippets that are included with the framework, edit this content to see how it was generated
Sub Nav:
Main Nav:
Footer Nav:
Unique Per Page
Google Maps
The 'GoogleMaps' Class provides functions to easily add Google maps to your site.
NOTE: This requires the jquery.js file and the jquery.jmap.js files to be present
Example:
//This is a controller function
public function googleMaps()
{
//Include the GoogleMaps Class file
require_once '/libs/standalone/GoogleMaps.php';
$this->addJSFile('js/jquery.jmap.js');
$this->addJSFile('js/jMapHelper.js');
//Create an instance of the GoogleMaps Class by passing in the API Key,
//ID of the DIV that will hold the Mapadn the finaly the site url
$googleMaps = new GoogleMaps('[GoogleAPIKey]', 'map',
Config::$siteURL );
//Set the Zoom Level for the map
$googleMaps->setZoom(2);
//Add a marker by specifying the Latitude, Longitude and an HTML description
//that will be displayed in the bubble
$googleMaps->addLatLong('37.4419', '-122.1419','This is a test');
//Add a marker after Geocoding and address and an HTML description
//that will be displayed in the bubble
$googleMaps->addAddress('[SomeAddress]','This is a test');
$contentVars = array();
//Finaly Generate the Script and place it into the Framework Code Template Variable
$this->addToFrameworkCode($googleMaps->generateScript());
//Load the content '/views/[LanguageFolder]/libraries/googleMaps.php' file
$this->templateVars['rightContent'] = $this->loadMainContent('libraries/googleMaps');
$this->display($this->templateVars);
}
See it working below: