Problem/Motivation

Default node.html.twig adds the following when $page is FALSE

<h2 class="node__title">
<a href="/about-us/dept/security-test" rel="bookmark"><span class="field field--name-title field--type-string field--label-hidden">Security test</span>
</a>
</h2>

Steps to reproduce

Proposed resolution

Add an implementation of hook_preprocess_node

In this set $variables['page'] to TRUE when the $variables['elements']['#view_mode'] is ‘ca3’

Update existing CdfRenderSubscriberTest test to assert that the h2 isn’t output (this code exists in node/template/node.html.twig so should be happening in the test too)

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork govcms_ca3-3589638

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

larowlan created an issue. See original summary.

larowlan’s picture

Assigned: Unassigned » larowlan
Status: Active » Needs review

  • larowlan committed c28e8361 on 1.x
    fix: #3589638 Node templates can add extra h2 elements when rendered in...
larowlan’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.