one_sidebar.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * Layout for main column with one sidebar
  4. *
  5. * @package Elgg
  6. * @subpackage Core
  7. *
  8. * @uses $vars['title'] Optional title for main content area
  9. * @uses $vars['content'] Content HTML for the main column
  10. * @uses $vars['sidebar'] Optional content that is added to the sidebar
  11. * @uses $vars['nav'] Optional override of the page nav (default: breadcrumbs)
  12. * @uses $vars['header'] Optional override for the header
  13. * @uses $vars['footer'] Optional footer
  14. * @uses $vars['class'] Additional class to apply to layout
  15. */
  16. $class = 'elgg-layout elgg-layout-one-sidebar clearfix';
  17. if (isset($vars['class'])) {
  18. $class = "$class {$vars['class']}";
  19. }
  20. ?>
  21. <div class="<?php echo $class; ?>">
  22. <div class="elgg-sidebar">
  23. <?php
  24. echo elgg_view('page/elements/sidebar', $vars);
  25. ?>
  26. </div>
  27. <div class="elgg-main elgg-body">
  28. <?php
  29. echo elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs'));
  30. echo elgg_view('page/layouts/elements/header', $vars);
  31. // @todo deprecated so remove in Elgg 2.0
  32. if (isset($vars['area1'])) {
  33. echo $vars['area1'];
  34. }
  35. if (isset($vars['content'])) {
  36. echo $vars['content'];
  37. }
  38. echo elgg_view('page/layouts/elements/footer', $vars);
  39. ?>
  40. </div>
  41. </div>