Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
uw_fdsu_theme_resp
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_fdsu_theme_resp
Commits
5c59a95a
Commit
5c59a95a
authored
2 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5747: updating block template to use admin label
parent
9e194c68
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
templates/blocks/block.html.twig
+50
-42
50 additions, 42 deletions
templates/blocks/block.html.twig
with
50 additions
and
42 deletions
templates/blocks/block.html.twig
+
50
−
42
View file @
5c59a95a
{#
{#
/**
/**
* @file
* @file
* Theme override to display a block.
* Theme override to display a block.
*
*
* Available variables:
* Available variables:
* - plugin_id: The ID of the block implementation.
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to be added to the main container tag of this template.
* - attributes: array of HTML attributes populated by modules, intended to
* - id: A valid HTML ID and guaranteed unique.
* be added to the main container tag of this template.
* - title_attributes: Same as attributes, except applied to the main title tag that appears in the template.
* - id: A valid HTML ID and guaranteed unique.
* - title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
* - title_attributes: Same as attributes, except applied to the main title
* - title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.
* tag that appears in the template.
*
* - title_prefix: Additional output populated by modules, intended to be
* @see template_preprocess_block()
* displayed in front of the main title tag that appears in the template.
*/
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_block()
*/
#}
#}
{%
set
classes
=
[
'block'
,
'block-'
~
configuration.provider
|
clean_class
,
'block-'
~
plugin_id
|
clean_class
,
]
%}
{%
set
classes
=
[
{%
if
in_layout_builder
%}
'l-block--provider-'
~
configuration.provider
|
clean_class
,
{{
attach_library
(
'uw_theme_admin/uw_layout_builder'
)
}}
'l-block--id-'
~
plugin_id
|
clean_class
,
{%
endif
%}
]
%}
{%
set
attributes
=
attributes.addClass
(
classes
)
%}
{%
if
content
%}
<div
{{
attributes.addClass
(
classes
)
}}
>
{%
embed
'@layouts/block/block.twig'
with
{
{%
if
admin_label
%}
'attributes'
:
attributes
,
<div
class=
"uw-admin-label"
>
{{
admin_label
}}
</div>
'block_wrapper'
:
true
,
{%
endif
%}
'constrain'
:
''
,
{{
title_prefix
}}
'title_prefix'
:
title_prefix
,
{%
if
label
%}
'title_suffix'
:
title_suffix
,
<h2
{{
title_attributes
}}
>
{{
label
}}
</h2>
'label'
:
label
is
not
empty
?
label
:
false
,
{%
endif
%}
'content_wrapper'
:
true
{{
title_suffix
}}
}
%}
{%
block
content
%}
{{
content
}}
{%
block
content
%}
{%
endblock
%}
{{
content
}}
</div>
{%
endblock
%}
{%
endif
%}
{%
endembed
%}
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