I have the module configured to show titles, but it doesn't make sense to show titles when there is no content to display. Would probably work to either check if the item.content is empty before rendering the sitemap-box in the twig template or to check in the module code and pass a variable to the template, something like, "has_content" with a boolean and check against that before rendering the box in the template.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anthorn305 created an issue. See original summary.

anthorn305’s picture

This seems to just be an issue with Taxonomy Terms, I'm working on a patch now.

akalata’s picture

Version: 8.x-1.2 » 8.x-1.x-dev
Status: Active » Needs review
FileSize
1.78 KB

Thanks for the report!

Status: Needs review » Needs work

The last submitted patch, 3: 2828839-2.patch, failed testing.

The last submitted patch, 3: 2828839-2.patch, failed testing.

akalata’s picture

The test needs to be updated; should check for no description when there are no terms, and for description when there are terms listed (requires content tagged w/ terms).

akalata’s picture

Title: Hide Titles When Content Does Not Exist » Do not display taxonomy term title if no terms are displayed
Issue tags: +Needs tests
akalata’s picture

Assigned: Unassigned » akalata

  • akalata committed 45e04b0 on 8.x-1.x
    Issue #2828839 by akalata, anthorn305: Do not display taxonomy term...
akalata’s picture

Assigned: akalata » Unassigned
Status: Needs work » Fixed
Issue tags: -Needs tests

Fixed and refactored taxonomy-related tests.

Status: Fixed » Closed (fixed)

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