/pdf/code/trunk/administrator/components/com_artofpdf/views/com_menus/tmpl/menu_default.php
PHP | 54 lines | 31 code | 9 blank | 14 comment | 4 complexity | 33dbfaa1682ea0f2b1fa304c2ac56fca MD5 | raw file
- <?php
- /**
- * @version $Id: menu_default.php 385 2010-11-03 09:01:13Z eddieajau $
- * @package NewLifeInIT
- * @subpackage com_artofpdf
- * @copyright Copyright 2010 New Life in IT Pty Ltd. All rights reserved.
- * @license GNU General Public License version 2 or later.
- * @link http://www.theartofjoomla.com
- */
- // No direct access
- defined('_JEXEC') or die;
- JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
- //JHtml::stylesheet('default.css', 'administrator/components/com_artofpdf/media/css/');
- // This view is rather complicated so we need to work directly with the model.
- $model = $this->getModel();
- // Clone the current item so it doesn't get blown up in the recursion.
- $resolved = clone $this->resolved;
- $level = (int) $resolved->level;
- $title = sprintf(
- ' <h%d>%s</h%d>',
- $level+1,
- $resolved->title,
- $level+1
- );
- ?>
- <?php if ($resolved->newpage) : ?>
- <!--NEWPAGE-->
- <?php endif; ?>
- <?php if ($resolved->bookmark) : ?>
- <!--BOOKMARK<?php echo $level; ?> <?php echo $resolved->bookmark; ?>-->
- <?php endif; ?>
- <?php echo $title; ?>
- <?php echo $resolved->html; ?>
- <?php foreach ($resolved->children as $child) : ?>
- <?php
- if ($child instanceof JPdfContent) :
- // This content for this item has already been resolved.
- $this->resolved = $child;
- else :
- // Resolve the item.
- $this->resolved = $model->resolve($child);
- endif;
- echo $this->loadTemplate($this->resolved->layout);
- ?>
- <?php endforeach; ?>