theme_sandbox.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * Theme preview page shell
  4. *
  5. * @uses $vars['title'] The page title
  6. * @uses $vars['body'] The laid out content of the page
  7. * @uses $vars['sysmessages'] System message array
  8. */
  9. $messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
  10. $content = elgg_view('page/elements/body', $vars);
  11. $title_link = elgg_view('output/url', array(
  12. 'text' => 'Theme Sandbox',
  13. 'href' => 'theme_preview/intro',
  14. 'is_trusted' => true,
  15. ));
  16. $header = "<h1 class=\"theme-sandbox-site-heading\">$title_link</h1>";
  17. if (get_input("site_menu", false)) {
  18. $header .= elgg_view_menu('site');
  19. }
  20. $body = <<<__BODY
  21. <div class="elgg-page theme-sandbox-page">
  22. <div class="elgg-page-messages">
  23. $messages
  24. </div>
  25. __BODY;
  26. $body .= <<<__BODY
  27. <div class="theme-sandbox-header">
  28. <div class="elgg-inner">
  29. $header
  30. </div>
  31. </div>
  32. <div class="theme-sandbox-body">
  33. <div class="elgg-inner">
  34. $content
  35. </div>
  36. </div>
  37. </div>
  38. __BODY;
  39. $body .= elgg_view('page/elements/foot');
  40. $head = elgg_view('page/elements/head', $vars);
  41. echo elgg_view("page/elements/html", array("head" => $head, "body" => $body));