Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dic-global-dev
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Manzar Hussain
dic-global-dev
Commits
8342df45
Commit
8342df45
authored
Dec 30, 2020
by
Manzar Hussain
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-theme' into 'develop'
add field See merge request manzarH/dic-global-dev!125
parents
ba897fb0
9d423688
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
9 deletions
+77
-9
block.html.twig
themes/custom/envigo/templates/block/block.html.twig
+2
-2
field.html.twig
themes/custom/envigo/templates/field/field.html.twig
+74
-0
node--page.html.twig
themes/custom/envigo/templates/layout/node--page.html.twig
+1
-7
No files found.
themes/custom/envigo/templates/block/block.html.twig
View file @
8342df45
...
...
@@ -25,7 +25,7 @@
* @see template_preprocess_block()
*/
#}
<div
{{
attributes
}}
>
{{
title_prefix
}}
{%
if
label
%}
<h2
{{
title_attributes
}}
>
{{
label
}}
</h2>
...
...
@@ -34,4 +34,4 @@
{%
block
content
%}
{{
content
}}
{%
endblock
%}
</div>
themes/custom/envigo/templates/field/field.html.twig
0 → 100644
View file @
8342df45
{#
/**
* @file
* Theme override for a field.
*
* To override output, copy the "field.html.twig" from the templates directory
* to your theme's directory and customize it, just like customizing other
* Drupal templates such as page.html.twig or node.html.twig.
*
* Instead of overriding the theming for all fields, you can also just override
* theming for a subset of fields using
* @link themeable Theme hook suggestions. @endlink For example,
* here are some theme hook suggestions that can be used for a field_foo field
* on an article node type:
* - field--node--field-foo--article.html.twig
* - field--node--field-foo.html.twig
* - field--node--article.html.twig
* - field--field-foo.html.twig
* - field--text-with-summary.html.twig
* - field.html.twig
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether to show the field label or not.
* - title_attributes: HTML attributes for the title.
* - label: The label for the field.
* - multiple: TRUE if a field can contain multiple items.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item's content.
* - entity_type: The entity type to which the field belongs.
* - field_name: The name of the field.
* - field_type: The type of the field.
* - label_display: The display settings for the label.
*
*
* @see template_preprocess_field()
*/
#}
{%
set
classes
=
[
'field'
,
'field--name-'
~
field_name
|
clean_class
,
'field--type-'
~
field_type
|
clean_class
,
'field--label-'
~
label_display
,
label_display
==
'inline'
?
'clearfix'
,
]
%}
{%
set
title_classes
=
[
'field__label'
,
label_display
==
'visually_hidden'
?
'visually-hidden'
,
]
%}
{%
if
label_hidden
%}
{%
if
multiple
%}
{%
for
item
in
items
%}
{{
item.content
}}
{%
endfor
%}
{%
else
%}
{%
for
item
in
items
%}
{{
item.content
}}
{%
endfor
%}
{%
endif
%}
{%
else
%}
{{
label
}}
{%
for
item
in
items
%}
{{
item.content
}}
{%
endfor
%}
{%
endif
%}
themes/custom/envigo/templates/layout/node--page.html.twig
View file @
8342df45
...
...
@@ -42,13 +42,7 @@
* @see html.html.twig
*/
#}
{{
content
}}
{{
content
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment