Closed (fixed)
Project:
Location Views
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2009 at 14:06 UTC
Updated:
11 Aug 2009 at 13:21 UTC
Hi everyone:
I'm working on a project that just use views and CCK. I have one new content type CCK with one field of type Location.
Everything is fine if I preview the content but If I use the view cant see any of the Location Info
If I see the node wheres is the data, everything is fine too..
But when I use the views I can't get any info from the Location. I've been searching for hours but I didn't find any solution. I put all the permissions, I'm sure i put the data to be displayed. But when i'm trying to display by views no data about Location is possible.
Anyone has any idea?
Comments
Comment #1
nahuelsgk commentedSorry. For anybody that happened the shame.
The problem was the relationship of the vies. You have to make a relationship between the Location and your content field.
Comment #2
andrewsuth commentedFor anyone else stuck on this, here is a more verbose description of how you access the fields inside the Location CCK. (ie. City, Country, Address, etc)
In this example,
Venueis a Content type with a Location CCK field calledLocationNow, within Views, do the following:
Relationships:
Content: LocationFields:
Location: Country(which I set to have a relationship to "Location")The relationship links your View to the CCK Location database table. Then when you add
Location: Countryit knows where to find it as it is linked to your View.A brilliant videocast explaining Views2 relationships can be seen here: http://drewish.com/node/127
I recommend anyone struggling with Relationships to watch it a few times, until it sinks in.
Comment #3
bartezz commentedHi Andrew,
THANK YOU A BILLION! Have spent hours and hours figuring out why a view with type location did work with CCK location field but view with type node didn't.
Relationships did the job!
Cheers mate
Comment #4
andrewsuth commentedHi Batrezz,
Glad it helped you out. I was also stuck on the same problem for several hours until I got a few hints from nahuelsgk's message above.
It appears undecipherable in the beginning but it really is worth spending the time learning the power of Relationships in the Views module. It adds a whole new level of flexability. I don't know how I developed sites without it before.
Comment #5
bartezz commentedFor others;
http://drupal.org/node/386848#comment-1368296
ALSO THIS
http://drupal.org/node/386848#comment-1590284
Cheers