Hi folks

I am building a view of type field collection item. I am able to access the field collection items perfectly though I want to pick node id from url to pass as an argument.
That is I want to pick only filed collection item related to node page we are currently on.

Any suggestions?

Thanks

Comments

jmuzz’s picture

Issue summary: View changes
Status: Active » Fixed

If you are on a page for a node you can get the node object with menu_get_object() and then get it's id from $node->nid . You could also use the arg() function but it is not recommended.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.