Exemple #1
0
 /**
  * This function builds the main structure in HTML.
  *
  * @param string $parameteres['menu']
  *        	the body
  * @param string $parameters['title]
  *        	the title
  * @return string the parsed HTML-structure
  * @uses BEGINNING_OF_URL for links
  */
 public static function buildView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     require_once dirname(__FILE__) . '/ErrorView.php';
     \PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(new ErrorView(), 'raiseError'));
     $tpl = new \HTML_Template_it(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('from-design-to-web-template.html');
     ////
     if (isset($parameters['logos'])) {
         $tpl->setCurrentBlock('logos');
         $tpl->setVariable(array('LOGO' => $parameters['logos']));
         $tpl->parse('logos');
     }
     if (isset($parameters['menus'])) {
         if (isset($parameters['menus'][MENU_COMMON])) {
             $tpl->setCurrentBlock('menu-items');
             $tpl->setVariable(array('MENU-ITEMS' => $parameters['menus'][MENU_COMMON]));
             $tpl->parse('menu-items');
             // echo ' 190: ', $tpl->get('menu-items');
         }
         if (isset($parameters['menus'][MENU_OUTER])) {
             $tpl->setCurrentBlock('outer-links');
             $tpl->setVariable(array('OUTER-LINKS' => $parameters['menus'][MENU_OUTER]));
             $tpl->parse('outer-links');
         }
         if (isset($parameters['menus'][MENU_INNER])) {
             $tpl->setCurrentBlock('inner-links');
             $tpl->setVariable(array('INNER-LINK' => $parameters['menus'][MENU_INNER]));
             $tpl->parse('inner-links');
         }
     }
     ////
     if (isset($parameters['services'])) {
         $tpl->setCurrentBlock('services');
         $tpl->setVariable(array('SERVICES' => $parameters['services']));
         $tpl->parse('services');
     }
     $tpl->setCurrentBlock('html');
     $tpl->setVariable(array('CALL-US' => 'Call us', 'NOW' => 'Now', 'QUICK' => 'Quick', 'VIDEOS' => 'Video Tour', 'OUR-WORKS' => 'How we design our works!', 'TWITTER' => 'Twitter', 'FEED' => 'Feed', 'LIKE-US' => 'Like us on', 'FACEBOOK' => 'Facebook', 'ACTION' => '', 'BEGINNING-OF-URL' => BEGINNING_OF_URL, 'HREF-OF-VIDEOS' => 'http://youtube.com', 'PHONE-NUMBER' => '(012) 35 6789', 'TIME' => View::ago(strtotime('2015-11-07 12:13:29')), 'TITLE' => 'Insert title here'));
     $tpl->parse('html');
     return $tpl->get('html');
 }
Exemple #2
0
 /**
  * This function builds the main structure in HTML.
  *
  * @access public
  * @author kalmer:piiskop <*****@*****.**>
  * @param string $parameters['menu']
  *        	the body
  * @param string $parameters['title']
  *        	the title
  * @return string the parsed HTML-structure
  * @uses BEGINNING_OF_URL for links
  */
 public static function buildView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('from-design-to-web-template.html');
     if (isset($parameters['menu'])) {
         $tpl->setCurrentBlock('menu-items');
         $tpl->setVariable(array('MENU-ITEMS' => $parameters['menu']));
         $tpl->parse('menu-items');
     }
     if (isset($parameters['services'])) {
         $tpl->setCurrentBlock('services');
         $tpl->setVariable(array('SERVICES' => $parameters['services']));
         $tpl->parse('services');
     }
     $tpl->setCurrentBlock('html');
     $tpl->setVariable(array('ACTION' => '', 'BEGINNING-OF-URL' => BEGINNING_OF_URL, 'HREF-OF-VIDEOS' => 'http://youtube.com', 'PHONE-NUMBER' => '(012) 35 6789', 'TIME' => View::ago(strtotime('2015-11-07 12:13:29')), 'TITLE' => 'Insert title here'));
     $tpl->parse('html');
     return $tpl->get('html');
 }
Exemple #3
0
 /**
  * This function builds the main structure in HTML.
  *
  * @access public
  * @param string $parameters['menu']
  *        	the body
  * @param string $parameters['title']
  *        	the title
  * @return string the parsed HTML-structure
  * @uses BEGINNING_OF_URL for links
  */
 public static function buildView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT("./html");
     $tpl->loadTemplatefile('burnstudio-copy.html');
     if (isset($parameters['menu'])) {
         //block name
         $tpl->setCurrentBlock('menu-itmes');
         //inside block name is another block name
         $tpl->setVariable(array('MENU-ITEM' => $parameters['menu']));
         $tpl->parse('menu-items');
     }
     if (isset($parameters['services'])) {
         $tpl->setCurrentBlock('services');
         $tpl->setVariable(array('SERVICES' => $parameters['services']));
         $tpl->parse('services');
     }
     $tpl->setCurrentBlock('html');
     $tpl->setVariable(array('TITLE' => 'Burnstudio', 'ACTION' => '', 'BEGINNING-OF-URL' => BEGINNING_OF_URL, 'HREF-OF-VIDEOS' => 'http://youtube.com', 'PHONE-NUMBER' => '(012) 35 6789', 'TIME' => View::ago(strtotime('2015-11-07 12:13:29'))));
     $tpl->parse('html');
     return $tpl->get('html');
 }