Source for file view.html.php
Documentation is available at view.html.php
* @subpackage com_weblinks
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* HTML View class for the WebLinks component
* @subpackage com_weblinks
* Execute and display a template script.
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* @return mixed A string if successful, otherwise a Error object.
public function display($tpl =
null)
parent::commonCategoryDisplay();
// Compute the weblink slug & link url.
foreach ($this->items as $item)
$item->slug =
$item->alias ?
($item->id.
':'.
$item->alias) :
$item->id;
if ($item->params->get('count_clicks', $this->params->get('count_clicks')) ==
1)
$item->link =
JRoute::_('index.php?option=com_weblinks&task=weblink.go&id='.
$item->id);
$item->link =
$item->url;
$temp->loadString($item->params);
$item->params =
clone($this->params);
$item->params->merge($temp);
$menus =
$app->getMenu();
$pathway =
$app->getPathway();
// 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_WEBLINKS_DEFAULT_PAGE_TITLE'));
$id = (int)
@$menu->query['id'];
if ($menu &&
($menu->query['option'] !=
'com_weblinks' ||
$id !=
$this->category->id))
$this->params->set('page_subheading', $this->category->title);
$path =
array(array('title' =>
$this->category->title, 'link' =>
''));
$category =
$this->category->getParent();
while (($menu->query['option'] !=
'com_weblinks' ||
$id !=
$category->id) &&
$category->id >
1)
$category =
$category->getParent();
$pathway->addItem($item['title'], $item['link']);
Documentation generated on Tue, 19 Nov 2013 15:16:55 +0100 by phpDocumentor 1.4.3