page.tpl.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language ?>" lang="<?php print $language ?>"><?php
  4. global $_menu;
  5. $primary = $_menu['items'][variable_get('menu_primary_menu',0)]['children'];
  6. $primary_links = '<ul class="links primary-links">';
  7. foreach ($primary as $link_id)
  8. {
  9. $primary_links .= '<li>'
  10. . theme('menu_item_link', $_menu['items'][$link_id], $_menu['items'][$link_id])
  11. . "</li>\n";
  12. }
  13. $primary_links .= "</ul>\n";
  14. //dprint_r($primary_links);
  15. ?>
  16. <head>
  17. <title><?php print $head_title ?></title>
  18. <?php print $head ?>
  19. <?php print $styles ?>
  20. <?php print $scripts ?>
  21. <!--[if lt IE 7]>
  22. <style type="text/css" media="all">@import "<?php print base_path() . path_to_theme() ?>/fix-ie.css";</style>
  23. <![endif]-->
  24. </head>
  25. <body<?php print phptemplate_body_class($sidebar_left, $sidebar_right); ?>>
  26. <!-- Layout -->
  27. <div id="navigation"></div>
  28. <div id="wrapper">
  29. <div id="container" class="clear-block">
  30. <div id="header">
  31. <div id="logo-floater">
  32. <?php
  33. // Prepare header
  34. $site_fields = array();
  35. if ($site_name) {
  36. $site_fields[] = check_plain($site_name);
  37. }
  38. if ($site_slogan) {
  39. $site_fields[] = check_plain($site_slogan);
  40. }
  41. $site_title = implode(' ', $site_fields);
  42. $site_fields[0] = '<span>'. $site_fields[0] .'</span>';
  43. $site_html = implode(' ', $site_fields);
  44. if ($logo || $site_title) {
  45. print '<h1><a href="'. check_url($base_path) .'" title="'. $site_title .'">';
  46. if ($logo) {
  47. print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />';
  48. }
  49. print $site_html .'</a></h1>';
  50. }
  51. ?>
  52. </div>
  53. <?php if (isset($primary_links)) : ?>
  54. <?php print $primary_links /* theme('links', $primary_links, array('class' => 'links primary-links')) */ ?>
  55. <?php endif; ?>
  56. <?php if (isset($secondary_links)) : ?>
  57. <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?>
  58. <?php endif; ?>
  59. </div> <!-- /header -->
  60. <?php if ($sidebar_left): ?>
  61. <div id="sidebar-left" class="sidebar">
  62. <?php if ($search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?>
  63. <?php print $sidebar_left ?>
  64. </div>
  65. <?php endif; ?>
  66. <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner">
  67. <?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
  68. <?php if ($header): print '<div id="header-region">'. $header .'</div>'; endif; ?>
  69. <?php if ($breadcrumb): print $breadcrumb; endif; ?>
  70. <?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
  71. <?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
  72. <?php if ($tabs): print $tabs .'</div>'; endif; ?>
  73. <?php if ($tabs2): print $tabs2; endif; ?>
  74. <?php if ($help): print $help; endif; ?>
  75. <?php if ($messages): print $messages; endif; ?>
  76. <?php print $content ?>
  77. <span class="clear"></span>
  78. <div id="footer"><?php print $footer_message ?></div>
  79. </div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->
  80. <?php if ($sidebar_right): ?>
  81. <div id="sidebar-right" class="sidebar">
  82. <?php if (!$sidebar_left && $search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?>
  83. <?php print $sidebar_right ?>
  84. </div>
  85. <?php endif; ?>
  86. <div style="clear:both" />
  87. </div> <!-- /container -->
  88. </div>
  89. <!-- /layout -->
  90. <?php print $closure ?>
  91. </body>
  92. </html>