referenced nodes

bneel - September 12, 2008 - 12:57
Project:NodeReferrer
Version:5.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:bneel
Status:active
Description

I have a website in drupal 5.10 containing the profile fo1500 companies. The profile displays the lat and long of the company, allowing to view each companies in a map (I use the gmap module and the location module).
Now I want to add job opportunities related to a company. The idea is to make a new content type named “content_job” which reference the company by a CCK node reference. At this point all is ok. But, now, I want to make a gmap view of all “content_job”. I think that there 2 possibilities:
- The first one is to filter companies which are referenced by a content_job in order to get the lat. and long. (but I think that there will be a problem if there are 2 jobs for 1 company)
- The second one is to filter by content_job and to get the title, lat. and long. of the referenced nodes (i.e. the content_company)
I try the node referrer module, but his module allows filtering referrer and not referenced nodes.
Do you have any idea how to do this?
Benjamin

#1

bneel - September 17, 2008 - 07:08

ok,
I found a way to do this.
I use the view fusion module. This module needs the view family module.
In the view fusion projet : http://drupal.org/project/views_fusion there is a patch for the CCK module. This patch allow you to integrate nodereference CCK in the view family option. I use this patch http://drupal.org/node/123482 #59
The view fusion module allows you to fuse multiple views into one.
- Create the principal view (in my case this is the company view)
- Create the second view (in my case this is the job view).
- Make a node family relationship : parent is company - child is job and the relation is nodereferrence my_field - reverse because the content_job CCK nodereference the content_company.
- go to the principal view and you'll have the company data and the job data in the same ligne. Only the companies which are nodereferrenced by job will be display.
With this thechnique, nodereferrer or referenced by filter modules or node referenced module are not required and you have all the flexibility with the view module.

You can have a bing SQL error. The problem is that the nodereference name have to be short. More infos here http://drupal.org/node/145397

 
 

Drupal is a registered trademark of Dries Buytaert.