July 24, 2012
Fixing display of Private and Public files
Apparently FileField Stats doesn't play well with Views of type Node. Because of this, I needed to create new views for listing data files on the data set node. Here is some documentation on these Views. Once the View Panes were built, I added them to the Data Set Panel Node Template.
I have two content types with a node reference between them: [Data Set]->[Data File]. I'm also using the Node Referrer module to reverse the node reference direction. This is D6. Here are the fields of interest:
Associated Data File : [field_dataset_datafile_ref] - Node Reference Type
Public Data File: [field_datafile_public] - FileField Type
Associated Data Set: [field_dataset_referrer] - Node Referrer Type
I want to display referenced [Data Files] on the [Data Set] node via a View that takes the NID of the [Data Set] as an argument and uses relationships to pull in a list of files from the [Data Files] nodes. I will embed this View into a Panels Node Template. Originally, I used a Node type view, but the download link fails because of previously mentioned problems.
Here's my setup:
View Type: File
Relationship 1: "Content: Public Data File Field" > Label: Public Data File
Relationship 2: "Node: Referrer" > Relationship: Public Data File > Label: Referencing Public Data Nodes > Using field: [field_dataset_datafile_ref]
Argument: "Node: Nid" > Relationship: Referencing Public Data Nodes
Content: Public Data File (field_datafile_public) > Relationship: Public Data File
Here's an example of a Data Set node displaying the file from a Data File node: http://umbs.lsa.umich.edu/research/node/8021
Posted by kkwaiser at July 24, 2012 10:58 AM