Posted by Branjawn on July 29, 2010 at 4:14pm
I use a CCK field to attach a specific image type on PAGE and STORY content types.
I have a few nodes on the menu that are "pages" created by Views.
I now see I would like to add that CCK field to these pages, how would one go about adding CCK to a view?
I figure I could ask on the Views issue queue... and get a reply 19 days later.

Comments
Trivial
Branjawn:
It's very simple. I presume you have already created your CCK fields. Next, in your list view, you'll need to set Basic Setttings:Row Style in your target display from "Node" to "Fields" After doing so you'll have access to all your fields, CCK and core, available for inclusion in your views query. I have feeling that after having done this, your remaining questions will be answered?
Kyle
ok, I've done this before and
ok, I've done this before and it's a little backwards. View's pages aren't pages in the way node pages are, so you can't use CCK on them.
Download the views reference module http://drupal.org/project/viewreference
Add a view reference cck field to your Page content type
Set the path for your views page to be "not_used" and remove the title from the view.
Create a new page with the title of the view and path that you want, and use the views reference CCK field to associate that view with that page.
So, now you have a page node that includes a View and everything else that a page has, and can be treated like a node, but it's a view. kinda.
Oh, and if you want some
Oh, and if you want some awesome, exciting news - in Drupal 7 you can (theoretically) attach custom fields to Views (and many other things, like comments, user profiles, etc)!
Theoretic, because I'm not 100% sure that views will implement the new features of Field API, but it's hopeful.
Depending on how this fits
Depending on how this fits into the site, you could also consider making the view into a block.
Ken Winters
thanks, but not the right answer?
I don't want to retrieve CCK fields, I want to assign one to a view page.
Possible solutions.
OK, let me see if I understand you:
You have a "global" (shared across multiple content types) CCK image field that links images to content.
You have 1 or more views that retrieves stuff from the DB that currently do not have your CCK image field as part of the source. I.e, nodes that don't have a CCK Image field or some combination of nodes or other info that don't have a CCK image field in it.
You want output from the view that displays an image next to the view content.
How you do this depends on what you want your final output to be. Here's the key questions to think about:
Are the CCK filed images different for all content or is it a stock "categorization" set of images? I.e. the node gets any image that the user wants... or is this is an X type of posts get an X type image thing?
If it's a category thing, and you want the same image for all results from a view, you can add a "global" field to your view fields and put in the html to display the image you want. You can include various substitutions in the text, including using view arguments. This might allow you to have different images based on view input/results.
If it's not a category thing, then you will need to determine how the information you're putting together in the view gets mapped to the specific CCK Image field. You can't "Add" a blank CCK field to a view... it's not a real node, just a "logical" view of information. You will need some sort of "key" in the information gathered to link it to a content type that contains the CCK Image field.
Another "trick" that might apply here, is if you have a mix of nodes with CCK fields and some without, is to specify the CCK Field and use the "empty text" field option to specify a default image for items without one.
Hope this helps/makes sense.