PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/pdf/code/trunk/administrator/components/com_artofpdf/views/com_menus/tmpl/menu_default.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 54 lines | 31 code | 9 blank | 14 comment | 4 complexity | 33dbfaa1682ea0f2b1fa304c2ac56fca MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: menu_default.php 385 2010-11-03 09:01:13Z eddieajau $
  4. * @package NewLifeInIT
  5. * @subpackage com_artofpdf
  6. * @copyright Copyright 2010 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License version 2 or later.
  8. * @link http://www.theartofjoomla.com
  9. */
  10. // No direct access
  11. defined('_JEXEC') or die;
  12. JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
  13. //JHtml::stylesheet('default.css', 'administrator/components/com_artofpdf/media/css/');
  14. // This view is rather complicated so we need to work directly with the model.
  15. $model = $this->getModel();
  16. // Clone the current item so it doesn't get blown up in the recursion.
  17. $resolved = clone $this->resolved;
  18. $level = (int) $resolved->level;
  19. $title = sprintf(
  20. '&nbsp;<h%d>%s</h%d>',
  21. $level+1,
  22. $resolved->title,
  23. $level+1
  24. );
  25. ?>
  26. <?php if ($resolved->newpage) : ?>
  27. <!--NEWPAGE-->
  28. <?php endif; ?>
  29. <?php if ($resolved->bookmark) : ?>
  30. <!--BOOKMARK<?php echo $level; ?> <?php echo $resolved->bookmark; ?>-->
  31. <?php endif; ?>
  32. <?php echo $title; ?>
  33. <?php echo $resolved->html; ?>
  34. <?php foreach ($resolved->children as $child) : ?>
  35. <?php
  36. if ($child instanceof JPdfContent) :
  37. // This content for this item has already been resolved.
  38. $this->resolved = $child;
  39. else :
  40. // Resolve the item.
  41. $this->resolved = $model->resolve($child);
  42. endif;
  43. echo $this->loadTemplate($this->resolved->layout);
  44. ?>
  45. <?php endforeach; ?>