<?php
/**
* @version		3.0.0
* @package		JomLand TicketCenter
* @copyright	Copyright (C) 2010 JomLand.com. All rights reserved.
* @link 		www.jomland.com
* @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
 // no direct access
defined('_JEXEC') or die('Restricted access');
?>
<?php if ($this->menuparams->get('show_page_title', 1)): ?>
<div class="componentheading<?php echo $this->escape($this->menuparams->get('pageclass_sfx')); ?>">
<h2><?php echo $this->escape($this->menuparams->get('page_title')); ?></h2>
</div>
<?php endif; ?>

<div class="contentpane<?php echo $this->escape($this->menuparams->get('pageclass_sfx')); ?>">
<?php
if ($this->items){?>
	<ul class="cjlticket_categories">
	<?php foreach ($this->items as $item){
		$url = JRoute::_('index.php?option=com_jlticketcenter&view=category&id='.$item->id.'&Itemid='.$this->itemid);
	?>
		<li><a href="<?php echo $url;?>"><?php echo $item->title;?></a>
			<?php
				$children =$item->getChildren();  
				if (!empty($children)){ ?>
					<ul>
					<?php 
					foreach ($children as $child){
								$url = JRoute::_('index.php?option=com_jlticketcenter&view=category&id='.$child->id.'&Itemid='.$this->itemid);
						?>
						<li><a href="<?php echo $url;?>"><?php echo $child->title;?></a>
						<?php 
					}
				?>
				
				</ul>
				<?php 
				}
			?>
		</li>
		
	<?php };// end foreach ?>
	</ul>
<?php }else{
	echo JText::_('JLTC_NO_CATEROGRIES') .'<br>';
}?>
</div>
