views:

27

answers:

2

Hi !

I have a view of type LOCATION. My problem is that when I try to add a cck field the type "content" is not available on the type dropdown.

I also tried to add a relationship but the content is not there also.

Any ideas ?

A: 

Here is what I did to solve the problem

1 - I added Views Custom Field Module

2 - Added a new field (PHP Custom Field) and I created a SQL command to search the content that I needed on the database.

I hope it helps.

João Guilherme
A: 

If your view type is location you are not going to be able to get the custom fields from your content type.

depending on what you are doing what you may want to do is:

  1. create a new content type called 'my_location'
  2. add location module ([location module][1])
  3. turn on location module, you are going to use the node location.
  4. create some content, DONT add location cck field that have lots of issues with mapping instead us the node location.

  5. add custom field to your content type 'my_location'

-- now the content type 'ym_location' acts as a single location with cck fields, if you need to connect this to other content on the site you can use the [Node Referrer][2]

  1. finally make a view of nodes NOT locations, then filer 'content type' to 'my_location' this will allow you to pull the location fields from the node and all the cck fields.

Hope this helps. I used this logic on a project where we needed more information on each location but we still wanted to map the locations.

theGoose
Thanks for the suggestion theGoose.
João Guilherme