Hi,

I was searching for a way to add to a node specific fields from another outside node. Finally I found that one way is to use a view and use nodereference in the relationfield and nod nid as the argument. Now I'm looking for a way to embelem specific fields from the view.
I know the the code to embelm is:
<?php print views_embed_view($view_name, 'default', $node->nid);?>
But it will embelem the entire view, is there a way to emelem specifc fields from the view? so I can theme them in the template?

Thanks in advance,
Sooki

Comments

dawehner’s picture

i think this is not possible

but you could create a view which just prints out one field, or you could get just the resulsts and not embed the output.

beautifulmind’s picture

For me, its showing nothing!!!

Any solution?

dawehner’s picture

what do you want to show? only one certain field?

if yes create a field which takes the nid as argument and has a single field as output

beautifulmind’s picture

I wanna show all the data from view, but it shows nothing.

nevets’s picture

Where does your code reside?

beautifulmind’s picture

I am developing custom module and within code, am trying to call the view.

nevets’s picture

So how is $view_name and $node set? Are you sure they have valid values?

esmerel’s picture

Status: Active » Closed (fixed)

No response to request for more info.