File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/includes/pages/viewallcategories.php
<?php
/**
* This file contains the iwp_page_viewallcategories class
*
* @version $Id$
*
*
* @package IWP
* @subpackage IWP_FrontEnd
*/
/**
* IWP Frontend View Categories Class
* This class extends the iwp_engine abstract class.
* This class handles the actions for viewing the list of root level categories on the frontend
*
* @package IWP
* @subpackage IWP_FrontEnd
*/
class iwp_page_viewallcategories extends iwp_engine {
/**
* Calls the parent constructor
*
* @return void Doesn't return anything
*/
public function __construct(){
parent::__construct();
}
/**
* This function tells the controller to loads the page displaying a list of all of the main categories.
*
* @return void Doesn't return anything
*/
public function ShowPage(){
$category = iwp_categories::getInstance();
$categoryName = $this->lang->Get('CategoriesTitle');
$categoryDesc = $this->lang->Get('CategoriesDescription');
$this->template->Assign('categoryTitle', $categoryName);
$this->template->Assign('categoryDescription', $categoryDesc , false);
$this->template->Assign('metaDescription', $categoryDesc);
$this->template->Assign('websiteTitle', $categoryName);
$breadCrumbTrailLinks = array();
$breadCrumbTrailLinks[] = array('Url' => iwp_config::Get('siteURL') .'/', 'Title' => $this->lang->Get('HomePage'));
// this results in an array of parents going in the wrong direction (nearest to furthest ancestor) - so reverse it
$breadCrumbTrailLinks = array_reverse($breadCrumbTrailLinks);
// add an unlinked breadcrumb entry for the current category
$breadCrumbTrailLinks[] = array('Title' => $categoryName);
$this->template->Assign(array('breadcrumbtrail', 'links'), $breadCrumbTrailLinks);
$this->template->Assign('categoryBreadcrumb', $this->template->ParseSection('breadcrumbtrail_standard'), false);
$lists = iwp_lists::getInstance();
$this->template->Assign('categorySubCategories', $lists->OutputListByQuery('select SQL_CALC_FOUND_ROWS *, c.categoryid as rowid, (select count(*) from '. IWP_TABLE_CATEGORIES .' cc where cc.parentid = c.categoryid and cc.hidefrommenu=0) as childcount from '.IWP_TABLE_CATEGORIES.' c where c.parentid=0 and c.hidefrommenu=0 order by c.sortcache', 'linked_title', 'categories'), false);
$this->controller->SetContent($this->template->ParseSection('viewcategory_standard'));
$this->controller->ShowTemplate('category');
}
}