Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Unverified Commit 3ff75d22 authored by Szilagyi Andras's avatar Szilagyi Andras Committed by GitHub
Browse files

Merge pull request #152 from openeuropa/OEL-1540

OEL-1540: Fix Scrollspy js file requirement when there is no items to display.
parents 2ad85abf ff18179a
No related branches found
No related tags found
1 merge request!157OEL-1668: Update epic list pages.
......@@ -90,6 +90,9 @@
"patches": {
"drupal/entity_reference_revisions": {
"https://www.drupal.org/project/entity_reference_revisions/issues/2937835": "https://www.drupal.org/files/issues/2021-03-26/entity_reference_revisions-field_formatter_label-2937835-36.patch"
},
"openeuropa/oe_bootstrap_theme": {
"latest": "https://github.com/openeuropa/oe_bootstrap_theme/compare/0.1.202206071025..1.x.diff"
}
},
"drupal-scaffold": {
......
......@@ -45,10 +45,14 @@
{% endset %}
<article{{attributes}}>
{{ pattern('inpage_navigation', {
title: 'Page content',
links: inpage_navigation_links,
content: inpage_navigation_fields,
full_layout: true,
}) }}
{% if inpage_navigation_links is empty %}
{{ inpage_navigation_fields }}
{% else %}
{{ pattern('inpage_navigation', {
title: 'Page content',
links: inpage_navigation_links,
content: inpage_navigation_fields,
full_layout: true,
}) }}
{% endif %}
</article>
......@@ -153,6 +153,15 @@ class ContentEventRenderTest extends WhitelabelBrowserTestBase {
'Event body',
$crawler->filter('#oe-content-body p')->text()
);
// Assert inpage_navigation not loaded if there is no body and documents.
$node->set('oe_documents', NULL);
$node->set('body', NULL);
$node->save();
$this->drupalGet('node/' . $node->id());
$this->assertSession()->elementNotExists('css', 'nav.bcl-inpage-navigation');
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment