Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bs_base
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
bs_base
Commits
57b4ec19
Commit
57b4ec19
authored
1 year ago
by
Ivica Puljic
Committed by
Ivica Puljic
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3378150
by pivica: Some menu blocks can not be loaded by id
parent
49426a64
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
themes/bs_bootstrap/bs_bootstrap.theme
+4
-2
4 additions, 2 deletions
themes/bs_bootstrap/bs_bootstrap.theme
with
4 additions
and
2 deletions
themes/bs_bootstrap/bs_bootstrap.theme
+
4
−
2
View file @
57b4ec19
...
...
@@ -349,10 +349,12 @@ function bs_bootstrap_preprocess_breadcrumb(&$variables) {
function
bs_bootstrap_preprocess_block
(
&
$variables
)
{
switch
(
$variables
[
'base_plugin_id'
])
{
case
'system_menu_block'
:
// Check that the block has a menu and it is enabled in theme settings.
// Check that the block has a menu
,
and it is enabled in theme settings.
if
(
isset
(
$variables
[
'content'
][
'#menu_name'
])
&&
!
empty
(
$variables
[
'elements'
][
'#id'
]))
{
$block
=
Block
::
load
(
$variables
[
'elements'
][
'#id'
]);
if
(
$block
->
getRegion
()
==
'navbar'
)
{
// Some blocks have overriden id, like for example tb_megamenu. If we
// can not load the block we will skip it for now.
if
(
$block
&&
$block
->
getRegion
()
==
'navbar'
)
{
$variables
[
'content'
][
'#theme'
]
=
'menu__navbar'
;
// On hover support only for second level horizontal navbar type for
// now.
...
...
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