All pastes #2076284 Raw Edit

Anonymous

public text v1 · immutable
#2076284 ·published 2011-06-07 17:07 UTC
rendered paste body
<?php
// No direct access to this file
defined('_JEXEC') or die;

// import Joomla Categories library
jimport( 'joomla.application.categories' );

class CtItemModelCtItem extends JModel
{

	private $_items = null;
	
	private $_parent = null;

	public function getItems($recursive = false)
	{
		$categories = JCategories::getInstance('Content');
		$this->_parent = $categories->get(15);
		if(is_object($this->_parent))
		{
			$this->_items = $this->_parent->getChildren($recursive);
		}
		else
		{
			$this->_items = false;
		}
		
		return $this->_items;
	}

}