Source for file view.html.php
Documentation is available at view.html.php
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @subpackage com_contact
* @return mixed False on error, null otherwise.
public function display($tpl =
null)
$params =
$app->getParams();
// Get some data from the models
$state =
$this->get('State');
$items =
$this->get('Items');
$category =
$this->get('Category');
$children =
$this->get('Children');
$parent =
$this->get('Parent');
$pagination =
$this->get('Pagination');
if (count($errors =
$this->get('Errors')))
// Compute the contact slug.
for ($i =
0, $n =
count($items); $i <
$n; $i++
)
$item->slug =
$item->alias ?
($item->id.
':'.
$item->alias) :
$item->id;
$temp->loadString($item->params);
$item->params =
clone($params);
$item->params->merge($temp);
if ($item->params->get('show_email', 0) ==
1)
$item->email_to =
trim($item->email_to);
$item->email_to =
JHtml::_('email.cloak', $item->email_to);
// Escape strings for HTML output
$maxLevel =
$params->get('maxLevel', -
1);
$this->maxLevel =
&$maxLevel;
$this->children =
&$children;
$this->params =
&$params;
$this->parent =
&$parent;
$menus =
$app->getMenu();
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu =
$menus->getActive();
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
$this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE'));
$title =
$this->params->get('page_title', '');
$title =
$app->getCfg('sitename');
elseif ($app->getCfg('sitename_pagetitles', 0) ==
1)
$title =
JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
elseif ($app->getCfg('sitename_pagetitles', 0) ==
2)
$title =
JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
$this->document->setTitle($title);
if ($this->params->get('menu-meta_description'))
$this->document->setDescription($this->params->get('menu-meta_description'));
if ($this->params->get('menu-meta_keywords'))
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
if ($this->params->get('robots'))
$this->document->setMetadata('robots', $this->params->get('robots'));
Documentation generated on Tue, 19 Nov 2013 15:17:13 +0100 by phpDocumentor 1.4.3