Posted by ntigh52 on November 11, 2012 at 10:59am
2 followers
Jump to:
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | field system |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
Hi to all,
I have content type with entity refernce filed ( one to many ) - multi value.
I added on views Relationships with this field.
Now I want to get one/some or all the fields that referenced to that filed.
As I mentioned, this field in one to many, so there are multi values.
How can I get the fields of specific node.
I cant declare to specific node...
p.s.
when I add this field I have multi value option that allow me to choose how many and how to order this field, bet not on the relation.
Thanks a lot.
Comments
#1
When I add a relation entity reference ( field_entityreferene) and I HAVE MULTI VALUES, I get lines per the number of the number of references I have.
But, What if I want to relate it just to the first one? / last one ?
I can't define it even I have a multi value entity reference field.
for example, if I add the entity refernce field to the fileds on views module I can define what is the specific vale that I want to show, ( first/last/ all / 3 etc...)
Hope I explain it right..
Thanks a lot.
#2
Actually what I asked for is the option to create a single record relation on views. ( from all the vallues/ items )
Just like when you can define in the entity refernce field on view, ( all, 1/2/3 items / reverse... )
Meanwhile I solved it this way,
I created one more field, 1 item = entity reference.
I added hook_node_presave. -> new_single_field = the specific_field_from_the_multivalues_of_the_other_entity_referece_field
Thanks
#3
This is a core issue, unrelated to entity reference. There are some patches available for D7. See #964288: Field output lacks 'first' and 'last' css classes for field-items