Node Information In Block
Ive built a small image gallery using
taxonomy
views
cck
image cache
taxonomy image
so far so good, however, on the actual nodes themselves (the image pages) im trying to create a block with information on it, such as:
how many times the node has been viewed
who created the node
what is the role of the user who created the node
how many comments are there
etc etc,
ive managed to build this in views and get it onto the nodes, however im clueless as to how to make the block draw the information from the node, because right now the blocks information is not true.
i have no idea how to use arguments, but im pretty sure thats what i need to use
long story short how can i display a nodes information in a block on the actual node itself??

Bump 1
Bump 1
Bump 2
Bump 2
Bump 3
Bump 3
you're 98% percent of the
you're 98% percent of the way there!
And your instincts were right, you need arguments to tell the block what node you want info for. Unfortunately, blocks don't understand regular views arguments, you have to specify it with code. Add an argument for "Node: nid", select "provide default argument', then 'php code', and try the following code:
if (arg(0) == 'node' && is_numeric(arg(1))) {return arg(1);
}
else {
return FALSE;
}
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
and for future reference,
and for future reference, bumping your own post 3 times in a minute is considered unacceptable. 8-(
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
it wasnt in a minute
i edited them, this forum doesent show edit times for some reason they were actually days apart(??????)