Closed (fixed)
Project:
radix
Version:
5.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Jun 2021 at 03:52 UTC
Updated:
6 Sep 2021 at 15:16 UTC
Jump to comment: Most recent
Node label isn't present in the default subtheme's node.twig.
In a node view it makes sense, but I think it's illogical with node view modes.
As an example, if you make a view block and display a content view-mode (ie teaser) instead of fields, there wont be any title.
This is the current code
<article{{ attributes.addClass(classes) }}>
{{ title_prefix }}
{{ title_suffix }}
{% block content %}
{{ content }}
{% endblock %}
</article>
I propose to add this instead.
<article{{ attributes.addClass(classes) }}>
{{ title_prefix }}
{% if label and not page %}
<h2{{ title_attributes }}>
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
</h2>
{% endif %}
{{ title_suffix }}
{% block content %}
{{ content }}
{% endblock %}
</article>
Comments
Comment #2
ckngThe thing is why a node component is included in the subtheme kit, as an example? I say let's remove it since this creates extra work to maintain.
Comment #3
doxigo commentedNicely pointed out JF, and totally agree with removing the subtheme
node.twig, we already have the parent theme for examples and such (we might as well add some more documentation on how things work). Currently, there's no point in having duplicate files.I'll add a
.gitkeepto thecomponentsfolder and remove any child directory withinComment #5
darkdimComment #6
darkdimComment #7
darkdim