Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At admin/structure/types/manage/[node-type]/display/full I changed the view mode for my field_collection where format = "Table of field collection items". The view mode setting is ignored, as viewing the original node still shows all fields as configured in the "Full content" display mode.
Comment | File | Size | Author |
---|---|---|---|
#7 | field_collection_table-1441668-7.patch | 1.11 KB | OnkelTem |
Comments
Comment #1
naoliva CreditAttribution: naoliva commentedI believe I have the same issue, but in my case there were two field collection tables, one of them was ok. Both when editing and visualizing them.
After lots of tests I discovered that field collection table is showed as a table only if the fields inside field collection accepts
unlimitedtwo or more entries.I know someone could argue that it is not necessary to create a field collection item if you have a single row of data. "Put directly inside the main Content Type". Or, why not using another module to group fields? But forget about that, if there is the possibility of creating a single row field collection, why not formatting as a table as well?
And I could not find a way to make this single row appears as a table when fields were directly inside the main Content Type. Even with field group module.
Any ideas?
Comment #2
charlie-s CreditAttribution: charlie-s commentednaoliva, I don't think your problem is related at all.
But, to achieve a table view for a single row of items, just pick "Field collection items" as the display formatter for your field_collection at admin/structure/types/manage/[node-type]/display/full
Comment #3
naoliva CreditAttribution: naoliva commentedI show bellow a sequence of screens which explain what I mean... in fact in my case I can't produce a Table of a single Field Collection Item formed by a single row of fields.
http://177.71.186.65/drupal/Field_collection_issue.html
Comment #4
charlie-s CreditAttribution: charlie-s commentedSo you're talking about the table to edit field_collections or to display field collections? In those screenshots you're never on the Manage Display tab.
Comment #5
naoliva CreditAttribution: naoliva commentedOh, yes. I tested now. This issue is restricted to edition forms presentation. I will open a new issue.
Comment #6
GRO CreditAttribution: GRO commentedI'm getting what I think is the same issue as the OP using Field Collection 7.x-1.0-beta4 and Field Collection Table 7.x-1.x-dev.
Playing around with Manage Display through either the Content Type admin page or Field Collections page has no bearing on how the fields appear in full content.
I've hidden two fields in the content type (that are included in the Field Collection) but they still appear outside of the Field Collection resulting in a double up of fields in the content type.
A workaround, or maybe the way it's designed to work, is to move the fields from the content type that the field collection is going to be appearing in. Ideally I'd prefer to be able to leave the fields where they are and simply hide them.
Comment #7
OnkelTem CreditAttribution: OnkelTem commentedPlease try and review.
Comment #8
OnkelTem CreditAttribution: OnkelTem commentedThe above patch is only dealing with "weight", which is not enough, and it is also a duplicate of a bit more comprehensive patch posted early by tanc in #1426806: Not using view modes correctly (& header showing when set to hidden)
Also, if you want customization of table output, read this: http://drupal.org/node/1652782#comment-6612476
Comment #9
OnkelTem CreditAttribution: OnkelTem commentedComment #10
WorldFallz CreditAttribution: WorldFallz commentedsee #1426806: Not using view modes correctly (& header showing when set to hidden)
Comment #11
attisancross linking http://drupal.org/node/2004742