Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
36430b4c
Commit
36430b4c
authored
Nov 29, 2006
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
#87090
by kkaefer. Render blocks before page content so they may insert headers.
parent
94fbfe8b
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/theme.inc
+4
-1
4 additions, 1 deletion
includes/theme.inc
themes/chameleon/chameleon.theme
+8
-8
8 additions, 8 deletions
themes/chameleon/chameleon.theme
with
12 additions
and
9 deletions
includes/theme.inc
+
4
−
1
View file @
36430b4c
...
@@ -363,6 +363,9 @@ function theme_placeholder($text) {
...
@@ -363,6 +363,9 @@ function theme_placeholder($text) {
* A string containing the entire HTML page.
* A string containing the entire HTML page.
*/
*/
function
theme_page
(
$content
)
{
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
=
"<!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
.
=
'<html xmlns="http://www.w3.org/1999/xhtml">'
;
$output
.
=
'<head>'
;
$output
.
=
'<head>'
;
...
@@ -375,7 +378,7 @@ function theme_page($content) {
...
@@ -375,7 +378,7 @@ function theme_page($content) {
$output
.
=
' <body style="background-color: #fff; color: #000;">'
;
$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
.
=
'<table border="0" cellspacing="4" cellpadding="4"><tr><td style="vertical-align: top; width: 170px;">'
;
$output
.
=
theme
(
'blocks'
,
'all'
)
;
$output
.
=
$blocks
;
$output
.
=
'</td><td style="vertical-align: top;">'
;
$output
.
=
'</td><td style="vertical-align: top;">'
;
$output
.
=
theme
(
'breadcrumb'
,
drupal_get_breadcrumb
());
$output
.
=
theme
(
'breadcrumb'
,
drupal_get_breadcrumb
());
...
...
This diff is collapsed.
Click to expand it.
themes/chameleon/chameleon.theme
+
8
−
8
View file @
36430b4c
...
@@ -32,6 +32,10 @@ function chameleon_page($content, $show_blocks = TRUE) {
...
@@ -32,6 +32,10 @@ function chameleon_page($content, $show_blocks = TRUE) {
$title = drupal_get_title();
$title = drupal_get_title();
// Get blocks before so that they can alter the header (JavaScript, Stylesheets etc.)
$blocks_left = theme_blocks('left');
$blocks_right = theme_blocks('right');
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
$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 .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\">\n";
$output .= "<head>\n";
$output .= "<head>\n";
...
@@ -71,10 +75,8 @@ function chameleon_page($content, $show_blocks = TRUE) {
...
@@ -71,10 +75,8 @@ function chameleon_page($content, $show_blocks = TRUE) {
$output .= " <table id=\"content\">\n";
$output .= " <table id=\"content\">\n";
$output .= " <tr>\n";
$output .= " <tr>\n";
if ($show_blocks) {
if ($show_blocks && !empty($blocks_left)) {
if ($blocks = theme_blocks("left")) {
$output .= " <td id=\"sidebar-left\">$blocks_left</td>\n";
$output .= " <td id=\"sidebar-left\">$blocks</td>\n";
}
}
}
$output .= " <td id=\"main\">\n";
$output .= " <td id=\"main\">\n";
...
@@ -103,10 +105,8 @@ function chameleon_page($content, $show_blocks = TRUE) {
...
@@ -103,10 +105,8 @@ function chameleon_page($content, $show_blocks = TRUE) {
$output .= " </td>\n";
$output .= " </td>\n";
if ($show_blocks) {
if ($show_blocks && !empty($blocks_right)) {
if ($blocks = theme_blocks("right")) {
$output .= " <td id=\"sidebar-right\">$blocks_right</td>\n";
$output .= " <td id=\"sidebar-right\">$blocks</td>\n";
}
}
}
$output .= " </tr>\n";
$output .= " </tr>\n";
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment