8000 Fields on field collections are matching the wrong template suggestion. · Issue #6 · backdrop-contrib/field_collection · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Fields on field collections are matching the wrong template suggestion. #6
Open
@jenlampton

Description

@jenlampton

I have a field collection field named field_steps on a node. I want the steps to be rendered as an ordered list, so I have overridden field--field-steps.tpl.php to change the markup. Now, every field on my field collection item is also being rendered using this template.

It appears that there are new theme hook suggestions being added for the inner fields in the pattern field--PARENT-FIELD-NAME--FIELD NAME, but this unfortunately will also match field--PARENT-FIELD-NAME if that template exists :(

This new suggestion should be changed to ``field--SOMETHING_ELSE--FIELD-NAMEwhere the something else is not going to accidentally match a different template. Maybe something likeparent-FIELD-NAME` or `child-of-FIELD-NAME` if we still want the name of the parent field included.

I looked through the field collection code, but couldn't see where the extra theme hook suggestions were being added. Do you know if this is something that's happening intentionally because of this module? Or do you think it's accidentally happening due to some problem somewhere else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0