Hello!
following problem:
I´ve two different content types. the first one are locations, the second one events. one event takes everytime place in one location. so every event posseses a reference field to a location. So far, so good. At the locations there are informations for longitude and latitude for gmap, street, city and other local informations.
I would like to present a gmap at the events nodes. But I don´t want to enter longitude and latitude for each event... is it possible, that the event node can get latitude and longitude from the reference node (the klocation) automatically?
It schould be the following effect: you apply a new event, you choose a location for the event by drop down field and you have automatically a gmap at the event node.
How can I do this?
I would be very happy for your advice,
Guevara
Comments
Comment #1
Guevara commentedNo idea?
Comment #2
Guevara commentedCan nobody help me???
For my project, this must be possible:
Create an event.
Select an Location from a list of Location-nodes.
The Event should have the fields from the refenrence node, like adress, longitude, latitude..
Comment #3
bomarmonk commentedI think you can do this with a node-reference field in CCK. Then make the node-type you are referring to a location node that contains the location information you want. I am doing something like this with a site that I am working on. I'm still testing out the possibilities, but I think this is possible, and I hope you have already found this solution.
Comment #4
naught101 commentedYou could use a computed field to get the data from the referenced node, I doubt this can be done with any currently available modules.
Comment #5
mckeen_greg commentedI would have an event content type, then a Venue (or location - but I like the word venue) content type. Then on Event, reference the Venue. Then, build a view, that takes the Event node ID as an Argument, create a relationship to the Venue, from which I create a relationship to Location - and thus display a Gmap.
The tricky part is getting your block display to Take the Argument from the Node ID. This is best achieved with Panels, but there are other means.
Comment #6
freighttrain commentedI am upgrading a site to Drupal 6 finally, and I had done this before with Drupal 5 and node reference. I was doing this to compare county data to statewide averages. I included a call in the node template. $item_nid = $node->field_california_node_reference[0]['nid'] ; and with this I can pull in all the individual CCK fields by referencing each variable individually as
print $node->field__of_4_year_olds_enrolle_1[0]['view']I am striking out trying to determine how to do this in Drupal 6 however. Ideas? Computed field?