<?php
/**
 * Routes configuration
 *
 * In this file, you set up routes to your controllers and their actions.
 * Routes are very important mechanism that allows you to freely connect
 * different urls to chosen controllers and their actions (functions).
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.Config
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
	Router::connect('/', ['controller' => 'pages', 'action' => 'index']);
	
	Router::connect('/admin', ['controller' => 'users', 'action' => 'dashboard', 'admin' => true]);
	
	Router::connect('/certificates.html', ['controller' => 'portfolios', 'action' => 'index']);

    Router::parseExtensions('rss','xml'); 
	
	Router::connect('/sitemap.html', ['controller' => 'pages', 'action' => 'sitemap']);
	
	Router::connect('/sitemap', array('controller' => 'sitemaps', 'action' => 'main'));

	Router::connect('/sitemap1', array('controller' => 'sitemaps', 'action' => 'index'));

	Router::connect('/sitemap:slug', ['controller' => 'sitemaps', 'action' => 'view'], ['pass' => ['slug']]);
	
    Router::connect('/:slug/our-products.html', ['controller' => 'locations', 'action' => 'product_list'], ['pass' => ['slug']]);
		
	Router::connect('/our-products.html', ['controller' => 'products', 'action' => 'index']);
	
	Router::connect('/our-websites.html', ['controller' => 'pages', 'action' => 'website']);
	
	Router::connect('/distributor.html', ['controller' => 'pages', 'action' => 'distributor']);
	
	Router::connect('/testimonials.html', ['controller' => 'testimonials', 'action' => 'index']);

	Router::connect('/events.html', ['controller' => 'events', 'action' => 'index']);
	
	Router::connect('/events/:slug.html', ['controller' => 'events', 'action' => 'view'], ['pass' => ['slug']]);
	
	Router::connect('/blog.html', ['controller' => 'blogs', 'action' => 'index']);
		
	Router::connect('/company-profile.html', ['controller' => 'pages', 'action' => 'about']);
	   
	Router::connect('/gallery.html', ['controller' => 'pages', 'action' => 'gallery']);
	
	Router::connect('/patent-certificate.html', ['controller' => 'pages', 'action' => 'patent']);
	
	Router::connect('/thank-you.html', ['controller' => 'pages', 'action' => 'thank_you']);

	Router::connect('/our-presence.html', ['controller' => 'locations', 'action' => 'index']);
	
	Router::connect('/manufacturers-category.html', ['controller' => 'catalogs', 'action' => 'manufacturers']);
	
	Router::connect('/exporters-category.html', ['controller' => 'catalogs', 'action' => 'exporters']);
	
	Router::connect('/suppliers-category.html', ['controller' => 'catalogs', 'action' => 'suppliers']);
	
	Router::connect('/wholesalers-category.html', ['controller' => 'catalogs', 'action' => 'wholesalers']);
	
	Router::connect('/retailer-category.html', ['controller' => 'catalogs', 'action' => 'retailer']);
	
	Router::connect('/wholesalers/:slug.html', ['controller' => 'catalogs', 'action' => 'productdetails'], ['pass' => ['slug']]);
	
	Router::connect('/retailer/:slug.html', ['controller' => 'catalogs', 'action' => 'productdetails'], ['pass' => ['slug']]);
	
	Router::connect('/manufacturers/:slug.html', ['controller' => 'catalogs', 'action' => 'productdetails'], ['pass' => ['slug']]);
	
	Router::connect('/suppliers/:slug.html', ['controller' => 'catalogs', 'action' => 'productdetails'], ['pass' => ['slug']]);
	
	Router::connect('/exporters/:slug.html', ['controller' => 'catalogs', 'action' => 'productdetails'], ['pass' => ['slug']]);	
	
	Router::connect('/contact-us.html', ['controller' => 'pages', 'action' => 'contact']);
	
	Router::connect('/our-dealers.html', ['controller' => 'pages', 'action' => 'dealers']);
	
	Router::connect('/trade-mark-registration.html', ['controller' => 'pages', 'action' => 'trade_mark']);
	
	Router::connect('/business-avenues.html', ['controller' => 'pages', 'action' => 'business_avenues']);
	
	Router::connect('/:slug.html', ['controller' => 'products', 'action' => 'view'], ['pass' => ['slug']]);
	
	Router::connect('/blogs/:slug.html', ['controller' => 'blogs', 'action' => 'view'], ['pass' => ['slug']]);
	
	Router::connect('/:location/products.html', ['controller' => 'products', 'action' => 'marketplace'], ['pass' => ['location']]);
	 
	Router::connect('/:slug/', ['controller' => 'locations', 'action' => 'view'], ['pass' => ['slug']]);
   
	Router::connect('/:location/:slug.html', ['controller' => 'locations', 'action' => 'product'], ['pass' => ['location','slug']]);
	
	

    CakePlugin::routes();


    require CAKE . 'Config' . DS . 'routes.php';

 