For field_collection_table I need to know if the item is being viewed standalone or as part of the parent entity.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | field_collection-1210806-7.patch | 465 bytes | tim.plunkett |
| #1 | field_collection-1210806-1.patch | 1.01 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettAttached.
Comment #2
damien tournoud commentedSee #1208864: Make the 'page' setting for entity view useful again. If it doesn't this module should use
$page = TRUEwhen callingentity_view(). You will find a'page'variable in the entity template.Comment #3
tim.plunkettfield_collection doesn't call entity_view, but
FieldCollectionItemEntity::view(), which doesn't implement EntityAPIControllerInterface, so it doesn't get to use $page?I might have misread the other issue, but I'm certainly lost on this.
Comment #4
fagoIndeed, $page is missing for Entity::view(). See #1208864-9: Make the 'page' setting for entity view useful again.
Thus, we should make use of entity API's way to handle $page. As said you'll find the page boolean in your render array / template variables.
Comment #5
tim.plunkettIt's not 100% clear what needs to be done within this issue anymore. Even with the changes to Entity,
view()is being called from field_collection with NO arguments, so I'm not sure what to pass to it.Also, if the page boolean is present in
hook_entity_view(), that's great, and this issue can be won't fixed.Comment #6
fagoyep, we still need to call view() with the right $page argument.
Also we want to improve view() to support all view-modes the host-entity types have and by default use the same view-mode as the host, when shown on host-view. That's another issue though.
Comment #7
tim.plunkettIf we're pushing the view mode fixes to another issue (which I agree with), then I think this is all we need?
Comment #8
fagothanks, committed.
Comment #9
tim.plunkettI don't see it here yet, did you push?
http://drupal.org/node/947174/commits
Comment #10
fagoyep, but a bit later. Sry for that.