chameleon_page
- Versions
- 4.6 – 4.7
chameleon_page($content)- 5
chameleon_page($content, $show_blocks = TRUE)- 6
chameleon_page($content, $show_blocks = TRUE, $show_messages = TRUE)
Code
themes/chameleon/chameleon.theme, line 17
<?php
function chameleon_page($content) {
$language = $GLOBALS['locale'];
$title = drupal_get_title();
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
$output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\">\n";
$output .= "<head>\n";
$output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n";
$output .= drupal_get_html_head();
$output .= " <link rel=\"stylesheet\" type=\"text/css\" href=\"themes/chameleon/common.css\" />\n";
$output .= theme_get_styles();
$output .= "</head>";
$output .= "<body". theme_onload_attribute() .">\n";
$output .= " <div id=\"header\">";
if ($logo = theme_get_setting('logo')) {
$output .= " <a href=\"./\" title=\"Home\"><img src=\"$logo\" alt=\"Home\" /></a>";
}
if (theme_get_setting('toggle_name')) {
$output .= " <h1 class=\"site-name title\">". l(variable_get('site_name', 'drupal'), ""). "</h1>";
}
if (theme_get_setting('toggle_slogan')) {
$output .= " <div class=\"site-slogan\">". variable_get('site_slogan', '') ."</div>";
}
$output .= "</div>\n";
$primary_links = theme_get_setting('primary_links');
$secondary_links = theme_get_setting('secondary_links');
if ($primary_links || $secondary_links) {
$output .= ' <div class="navlinks">';
if ($primary_links) {
$output .= '<div class="primary">'. $primary_links .'</div>';
}
if ($secondary_links) {
$output .= '<div class="secondary">'. $secondary_links .'</div>';
}
$output .= " </div>\n";
}
$output .= " <table id=\"content\">\n";
$output .= " <tr>\n";
if ($blocks = theme_blocks("left")) {
$output .= " <td id=\"sidebar-left\">$blocks</td>\n";
}
$output .= " <td id=\"main\">\n";
if ($title) {
$output .= theme("breadcrumb", drupal_get_breadcrumb());
$output .= "<h2>$title</h2>";
}
if ($tabs = theme('menu_local_tasks')) {
$output .= $tabs;
}
if ($help = menu_get_active_help()) {
$output .= "<div id=\"help\">$help</div><hr />";
}
$output .= theme_status_messages();
$output .= "\n<!-- begin content -->\n";
$output .= $content;
$output .= "\n<!-- end content -->\n";
if ($footer = variable_get('site_footer', '')) {
$output .= " <div id=\"footer\">$footer</div>\n";
}
$output .= " </td>\n";
if ($blocks = theme_blocks("right")) {
$output .= " <td id=\"sidebar-right\">$blocks</td>\n";
}
$output .= " </tr>\n";
$output .= " </table>\n";
$output .= theme_closure();
$output .= " </body>\n";
$output .= "</html>\n";
return $output;
}
?>Login or register to post comments 