<?php
/**
 * 
 * Trida zajistuje sestaveni sparvne cesty k napr. css file
 * @author aaa
 *
 */
class Zend_View_Helper_DinamicPath extends Zend_View_Helper_Abstract
{
	public function DinamicPath(){
		/*
         * funkce zohlednujici parametry v poli get menici adresu
         * tak aby byl spravne sestaven link pro css styl
         */
		$request = Zend_Controller_Front::getInstance()->getRequest();
        //echo $request->getRequestUri();
        
        $pathString="";
        $path = explode('index.php', $request->getRequestUri());
        $index = substr_count($path[1],'/');
        for ($index;$index > 0;$index--){
        	$pathString .= '../';
        }
        //echo "<p>".$pathString."</p>";
        return $pathString;
	}
}