Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_wrapper
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * @package     Joomla.Site
  14.  * @subpackage  com_wrapper
  15.  * @since       1.5
  16.  */
  17. {
  18.     /**
  19.      * @since  1.5
  20.      */
  21.     public function display($tpl null)
  22.     {
  23.         $app        JFactory::getApplication();
  24.  
  25.         $params $app->getParams();
  26.  
  27.         // because the application sets a default page title, we need to get it
  28.         // right from the menu item itself
  29.         $title $params->get('page_title''');
  30.         if (empty($title))
  31.         {
  32.             $title $app->getCfg('sitename');
  33.         }
  34.         elseif ($app->getCfg('sitename_pagetitles'0== 1)
  35.         {
  36.             $title JText::sprintf('JPAGETITLE'$app->getCfg('sitename')$title);
  37.         }
  38.         elseif ($app->getCfg('sitename_pagetitles'0== 2)
  39.         {
  40.             $title JText::sprintf('JPAGETITLE'$title$app->getCfg('sitename'));
  41.         }
  42.         $this->document->setTitle($title);
  43.  
  44.         if ($params->get('menu-meta_description'))
  45.         {
  46.             $this->document->setDescription($params->get('menu-meta_description'));
  47.         }
  48.  
  49.         if ($params->get('menu-meta_keywords'))
  50.         {
  51.             $this->document->setMetadata('keywords'$params->get('menu-meta_keywords'));
  52.         }
  53.  
  54.         if ($params->get('robots'))
  55.         {
  56.             $this->document->setMetadata('robots'$params->get('robots'));
  57.         }
  58.  
  59.         $wrapper new stdClass;
  60.         // auto height control
  61.         if ($params->def('height_auto'))
  62.         {
  63.             $wrapper->load 'onload="iFrameHeight()"';
  64.         }
  65.         else
  66.         {
  67.             $wrapper->load '';
  68.         }
  69.  
  70.         $url $params->def('url''');
  71.         if ($params->def('add_scheme'1))
  72.         {
  73.             // adds 'http://' if none is set
  74.             if (substr($url01== '/')
  75.             {
  76.                 // relative url in component. use server http_host.
  77.                 $wrapper->url 'http://'$_SERVER['HTTP_HOST'$url;
  78.             }
  79.             elseif (!strstr($url'http'&& !strstr($url'https'))
  80.             {
  81.                 $wrapper->url 'http://'$url;
  82.             }
  83.             else {
  84.                 $wrapper->url $url;
  85.             }
  86.         }
  87.         else
  88.         {
  89.             $wrapper->url $url;
  90.         }
  91.  
  92.         //Escape strings for HTML output
  93.         $this->pageclass_sfx htmlspecialchars($params->get('pageclass_sfx'));
  94.  
  95.         $this->params &$params;
  96.         $this->wrapper &$wrapper;
  97.  
  98.         parent::display($tpl);
  99.     }
  100. }

Documentation generated on Tue, 19 Nov 2013 15:16:52 +0100 by phpDocumentor 1.4.3