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
a4df7936
Commit
a4df7936
authored
Aug 9, 2010
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#845928
by JohnAlbin: Fixed System menu blocks don't get the same styling as menu module blocks.
parent
8db34bb2
No related branches found
No related tags found
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
modules/system/system.module
+10
-0
10 additions, 0 deletions
modules/system/system.module
themes/bartik/template.php
+1
-9
1 addition, 9 deletions
themes/bartik/template.php
with
11 additions
and
9 deletions
modules/system/system.module
+
10
−
0
View file @
a4df7936
...
...
@@ -1981,6 +1981,16 @@ function system_block_view($delta = '') {
}
}
/**
* Implements hook_preprocess_block().
*/
function
system_preprocess_block
(
&
$variables
)
{
// System menu blocks should get the same class as menu module blocks.
if
(
$variables
[
'block'
]
->
module
==
'system'
&&
in_array
(
$variables
[
'block'
]
->
delta
,
array_keys
(
menu_list_system_menus
())))
{
$variables
[
'classes_array'
][]
=
'block-menu'
;
}
}
/**
* Provide a single block on the administration overview page.
*
...
...
This diff is collapsed.
Click to expand it.
themes/bartik/template.php
+
1
−
9
View file @
a4df7936
...
...
@@ -105,17 +105,9 @@ function bartik_process_maintenance_page(&$variables) {
function
bartik_preprocess_block
(
&
$variables
)
{
// In the header region, visually hide the title of any menu block or of the
// user login block, but leave it accessible.
if
(
$variables
[
'block'
]
->
region
==
'header'
&&
(
$variables
[
'block'
]
->
module
==
'
menu'
||
$variables
[
'block'
]
->
module
==
'user'
&&
$variables
[
'block'
]
->
delta
==
'login'
))
{
if
(
$variables
[
'block'
]
->
region
==
'header'
&&
(
$variables
[
'block'
]
->
module
==
'
user'
&&
$variables
[
'block'
]
->
delta
==
'login'
||
in_array
(
'block-menu'
,
$variables
[
'classes_array'
])
))
{
$variables
[
'title_attributes_array'
][
'class'
][]
=
'element-invisible'
;
}
// System menu blocks should get the same class as menu module blocks.
if
(
in_array
(
$variables
[
'block'
]
->
delta
,
array_keys
(
menu_list_system_menus
())))
{
$variables
[
'classes_array'
][]
=
'block-menu'
;
// Also, hide the title if its in the header region.
if
(
$variables
[
'block'
]
->
region
==
'header'
)
{
$variables
[
'title_attributes_array'
][
'class'
][]
=
'element-invisible'
;
}
}
// Set "first" and "last" classes.
if
(
$variables
[
'block'
]
->
position_first
){
$variables
[
'classes_array'
][]
=
'first'
;
...
...
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