theme_page

Versions
5
theme_page($content)
6
theme_page()
7
theme_page($variables)

Return an entire Drupal page displaying the supplied content.

Parameters

$content A string to display in the main content area of the page.

Return value

A string containing the entire HTML page.

Related topics

Code

drupal/includes/theme.inc, line 392

<?php
function theme_page($content) {
  // Get blocks before so that they can alter the header (JavaScript, Stylesheets etc.)
  $blocks = theme('blocks', 'all');

  $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
  $output .= '<html xmlns="http://www.w3.org/1999/xhtml">';
  $output .= '<head>';
  $output .= ' <title>'. (drupal_get_title() ? strip_tags(drupal_get_title()) : variable_get('site_name', 'Drupal')) .'</title>';
  $output .= drupal_get_html_head();
  $output .= drupal_get_css();
  $output .= drupal_get_js();

  $output .= ' </head>';
  $output .= ' <body style="background-color: #fff; color: #000;">';
  $output .= '<table border="0" cellspacing="4" cellpadding="4"><tr><td style="vertical-align: top; width: 170px;">';

  $output .= $blocks;
  $output .= '</td><td style="vertical-align: top;">';

  $output .= theme('breadcrumb', drupal_get_breadcrumb());
  $output .= '<h1>' . drupal_get_title() . '</h1>';

  if ($tabs = theme('menu_local_tasks')) {
   $output .= $tabs;
  }

  $output .= theme('help');

  $output .= theme('status_messages');

  $output .= "\n<!-- begin content -->\n";
  $output .= $content;
  $output .= drupal_get_feeds();
  $output .= "\n<!-- end content -->\n";

  $output .= '</td></tr></table>';
  $output .= theme('closure');
  $output .= '</body></html>';

  return $output;
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.