If you just want to change what the view displays based on the value of the CCK field, the easiest way I've found is to insert the view into the template using views_embed_view() . Something like this in your template file will work, I think:
//Use the dsm function to print out your $node object //to get the name of the field you want to pass as an arg //like this: dsm($node); //Assuming that the value of that field is in $node->cck_field['0']: print views_embed_view('name_of_view', 'name_of_display', $node->cck_field['0'];
views_embed_view() only needs the first argument, the name of the view, to work. It will return HTML to display the default named view by default. We give it a specific display as a second argument. Everything after the second argument is passed to the view as an argument, so we pass the value of the field as an argument to the view. See this link for some documentation on how this feature works.
source share