| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: view.html.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @subpackage Weblinks 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant 9 * to the GNU General Public License, and as distributed it includes or 10 * is derivative of works licensed under the GNU General Public License or 11 * other free or open source software licenses. 12 * See COPYRIGHT.php for copyright notices and details. 13 */ 14 15 // Check to ensure this file is included in Joomla! 16 defined( '_JEXEC' ) or die( 'Restricted access' ); 17 18 jimport( 'joomla.application.component.view'); 19 20 /** 21 * HTML View class for the WebLinks component 22 * 23 * @static 24 * @package Joomla 25 * @subpackage Weblinks 26 * @since 1.0 27 */ 28 class WeblinksViewCategories extends JView 29 { 30 function display( $tpl = null) 31 { 32 global $mainframe; 33 34 $document =& JFactory::getDocument(); 35 36 $categories =& $this->get('data'); 37 $total =& $this->get('total'); 38 $state =& $this->get('state'); 39 40 // Get the page/component configuration 41 $params = &$mainframe->getParams(); 42 43 $menus = &JSite::getMenu(); 44 $menu = $menus->getActive(); 45 46 // because the application sets a default page title, we need to get it 47 // right from the menu item itself 48 if (is_object( $menu )) { 49 $menu_params = new JParameter( $menu->params ); 50 if (!$menu_params->get( 'page_title')) { 51 $params->set('page_title', JText::_( 'Web Links' )); 52 } 53 } else { 54 $params->set('page_title', JText::_( 'Web Links' )); 55 } 56 57 $document->setTitle( $params->get( 'page_title' ) ); 58 59 // Set some defaults if not set for params 60 $params->def('comp_description', JText::_('WEBLINKS_DESC')); 61 62 // Define image tag attributes 63 if ($params->get('image') != -1) 64 { 65 if($params->get('image_align')!="") 66 $attribs['align'] = $params->get('image_align'); 67 else 68 $attribs['align'] = ''; 69 $attribs['hspace'] = 6; 70 71 // Use the static HTML library to build the image tag 72 $image = JHTML::_('image', 'images/stories/'.$params->get('image'), JText::_('Web Links'), $attribs); 73 } 74 75 for($i = 0; $i < count($categories); $i++) 76 { 77 $category =& $categories[$i]; 78 $category->link = JRoute::_('index.php?option=com_weblinks&view=category&id='. $category->slug); 79 80 // Prepare category description 81 $category->description = JHTML::_('content.prepare', $category->description); 82 } 83 84 $this->assignRef('image', $image); 85 $this->assignRef('params', $params); 86 $this->assignRef('categories', $categories); 87 88 parent::display($tpl); 89 } 90 } 91 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |