Skip to content
Snippets Groups Projects
Commit 5a9c77e8 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Display the current node's title in the <title></title>-tag.
parent cd58e22e
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -19,7 +19,7 @@ function node_render($node) {
break;
case t("Post comment"):
comment_post($edit);
$theme->header();
$theme->header(check_output($node->title));
node_view($node);
comment_render($edit[id], $cid);
$theme->footer();
......@@ -36,20 +36,20 @@ function node_render($node) {
break;
case t("Update settings"):
comment_settings(check_query($mode), check_query($order), check_query($threshold));
$theme->header();
$theme->header(check_output($node->title));
node_view($node);
comment_render($id, $cid);
$theme->footer();
break;
case t("Update ratings"):
comment_moderate($moderate["comment"]);
$theme->header();
$theme->header(check_output($node->title));
node_view($node);
comment_render($id, $cid);
$theme->footer();
break;
default:
$theme->header();
$theme->header(check_output($node->title));
node_view($node);
comment_render($id, $cid);
$theme->footer();
......
......@@ -18,7 +18,7 @@ class Theme extends BaseTheme {
var $foreground = "#000000";
var $background = "#EAEAEA";
function header() {
function header($title = 0) {
global $HTTP_USER_AGENT;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -27,7 +27,12 @@ function header() {
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>
<?php
print variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", "");
if ($title) {
print variable_get("site_name", "drupal") ." - $title";
}
else {
print variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", "");
}
?>
</title>
<style type="text/css">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment