Closed (fixed)
Project:
Field Collection Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2012 at 14:55 UTC
Updated:
1 Aug 2012 at 08:51 UTC
For a view I needed the node id but there was no option to disable passing the entity_id's as arguments so my default argument never worked.
I added a 'Pass arguments' checkbox in the display settings to enable/disable passing the arguments to the view and fixed some minor code style issues along the way ;)
| Comment | File | Size | Author |
|---|---|---|---|
| pass_arguments.patch | 2.76 KB | mrharolda |
Comments
Comment #1
mrharolda commentedShameless bump...
Comment #2
g089h515r806 commentedHave you test you code with latest dev version?
Comment #3
marblegravy commentedMrHaroldA - Applying the patch I can get the entity ID to come across as a field value, but it's still not available to be used for contextual filters.
You can't use it or add it in the Filters section even, so I don't know how you used the value to give your view understanding of which node you are looking at?
Comment #4
mrharolda commented@marblegravy: I've used a "contextual filter: Content: Nid" with "Provide default value" set to "Content ID from URL".
Comment #5
jdjeet commentedHi,
MrHaroldA is right, You can use contextual filter if you want to filter the context to a certain section.
But for your query as you need nid to be available, you can use relationship.
I guess you are creating field collection entity view. you can get nid and other content details by creating a relationship to the relevant node entity.
-Thanks,
Jeet
Comment #6
marblegravy commentedThanks to both of you for your assistance.
Yes, the issue was that I was trying to use the provided field collection view template and apply that directly to the field which does not have nid available. The solution was to ignore that and create a block with a new view using a relationship. Much more flexible and let me do exactly what I needed to do.
Comment #7
jdjeet commentedComment #8
mrharolda commented@jdjeet: is this committed? Can't find it in the repository viewer: http://drupalcode.org/project/field_collection_views.git
Comment #9
g089h515r806 commentedField Collection already provide more views integration now.This issue could be resolved with latest version of field collection.
Comment #10
jdjeet commentedHey, I found the issue can be solved in the latest version of FC view.
Field collection gives you an relationship if you are looking to connect to another context in views.
Please let me know if I am wrong.
-Thanks,
Jeet.