Hi,

In Node Template on Views Node Feed, i want to use some code to retrieve current nid. I've been placing arg(1) but doesn't seem to work.

I want to display current product image on a banner. So i thought that i could do something like this:

if ($node->nid == arg(1)) {

//some code here
}

but no luck.

Is there an easy way of doing displaying a current node image or value in Views Node Feed?

thx

Comments

WorldFallz’s picture

I don't understand what you're trying to do, but the arg() function won't work on a views page-- it retrieves the pieces of a URL so if the url does not contain the nid arg() will be useless.