Source for file Seo.php
Documentation is available at Seo.php
* DotBoost Technologies Inc.
* DotKernel Application Framework
* @copyright Copyright (c) 2009 DotBoost Technologies (http://www.dotboost.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @version $Id: Seo.php 156 2010-06-23 12:24:13Z teo $
* SEO stuff. MetaKeyword, MetaDescription, Canonical URL, and other stuff related SEO.
* @author DotKernel Team <team@dotkernel.com>
* Option variable from dots/seo.xml file
//get the content of dots/seo.xml file into the option variable
$this->config = Zend_Registry::get('configuration');
$this->param = Zend_Registry::get('param');
* This method will be changed when will add URL ReWrite alternative
* @todo improvement of canonical url's
$url = $this->config->website->params->url;
if( '/' != substr($url, - 1, 1))
if('frontend' != $param['module'])
$url .= $param['module'] . '/';
if( '' != $param['controller'])
$url .= $param['controller'] . '/';
if( '' != $param['action'])
$url .= $param['action'] . '/';
//unset the request params: module, controller and action
unset ($param['controller']);
foreach ($param as $k => $v)
$url .= $k . '/' . $v . '/';
//remove 'option' xml atribute
$this->option->__unset('option');
if(isset ($this->option->canonicalUrl))
// add canonical url to the array from dots/seo.xml file
|