Problem/Motivation

Implements subentity_theme_suggestions_alter to add these suggestions :

  • subentity__SUBENTITY_TYPE_ID
  • subentity__VIEW_MODE
  • subentity__SUBENTITY_TYPE_ID__VIEW_MODE

Steps to reproduce

When using twig to customize display, suggestions are helpful.

Proposed resolution

Implements hook.

User interface changes

No.

API changes

No.

Data model changes

No.

Issue fork subentity-3364453

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

MaxPah created an issue. See original summary.

maxpah’s picture

Assigned: maxpah » Unassigned
maxpah’s picture

Issue summary: View changes
anfor’s picture

Status: Needs review » Needs work

Hi MaxPah,

It would be more interesting to directly use the hook_theme_suggestions_HOOK.

Regards,

maxpah’s picture

Hi anfor,

With subentities hook variable is not equal to "subentity" but is equal to $subentity->bundle().

Let's stay with hook_suggestion_alter.

anfor’s picture

Status: Needs work » Reviewed & tested by the community

Thanks

  • MaxPah committed ebce239c on 2.x
    Issue #3364453: Implements hook_theme_suggestion_alter
    
maxpah’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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