argument handling code for viewfields ?

JohnG - February 22, 2007 - 21:57
Project:Viewfield
Version:5.x-1.5
Component:User interface
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

apologies if posting this here annoys anyone, but

I'm struggling to find the correct argument handling code for a viewfield view - the problem is that all the snippets, etc I can find are designed for views in blocks and I can get them to work in viewfields ...

my specific question is here http://drupal.org/node/112871#comment-203553

but I would welcome any general pointers ...

#1

mfredrickson - February 22, 2007 - 22:04
Status:active» fixed

I posted a follow in your forum post. Basically, viewfield has some basic token handling. You can use %nid in your viewfield arguments to get the data you want.

Asking questions in this queue is fine. That's what it's here for. :-)

Feel free to reopen this ticket if you need more support.

Cheers,
-Mark

#2

JohnG - February 22, 2007 - 22:21

Damn! that was quick :)

It works too! Now that's what I call customer care :)

Thankyou so much, I was getting very confused :P

John

#3

Anonymous - March 8, 2007 - 22:31
Status:fixed» closed

#4

SocialNicheGuru - November 11, 2008 - 22:58
Version:5.x-1.0» 5.x-1.5
Status:closed» active

has passing an argument to a viewfield ever worked?

I cannot get it to work on any view.

argument is [nid]
I see it in the content template but the value is not substituted and thus no view. The view works fine with an argument in the url.

Chris

#5

SocialNicheGuru - November 13, 2008 - 16:55
Priority:normal» critical

i created a view that takes nid as an argument

I specify
force default
select only one allowed view
specify [nid] as argument

I have token installed.

If I specify an actual number like 100 instead of [nid] the argument is passed and a value is attribted to viewfield. I can see it in content template and in devel module.

If i use [nid], [vargs] = [nid] in devel and devel render. there is no substitution made for [nid].

any help out there?

Chris

#6

that0n3guy - November 20, 2008 - 17:38
Category:support request» bug report

I am also having this problem as activelyOUT. If use an actual number I get it to work, but when I look at devel it shows only [vargs] = [nid]. Shouldn't this show [vargs]=24 (or whatever number?

I use token for imce so I know its working.

Any ideas?

#7

that0n3guy - November 20, 2008 - 22:54

Oh... I got it to work... no idea how, it just started to work... I must have been doing something simple and causing it to not work.

check out this post http://drupal.org/node/112871#comment-1049858 he shows all his setting for doing it.

Just to note, devel still shows [vargs] => [nid] so I'm guessing its not supposed to actually show the nid.

#8

SocialNicheGuru - November 23, 2008 - 00:03

I just found this. I hoep this helps you all.

hi. i have been having problems with passing the current node as an argument in a viewfield. The current node is excluded because of recursion issues. I am using D5, but the solution was mentioned in an issue against D6 version of viewfield. It has taken me months to find this. I hope it helps someone else: http://drupal.org/node/165321

This particular comment worked like a charm
http://drupal.org/node/165321#comment-1033909

This SHOULD BE INCLUDED IN THE HANDBOOK OR README FOR VIEWFIELD SPECIFICALLY.

#9

SocialNicheGuru - December 29, 2008 - 21:00

Is there a safe way to use viewfiled if you are passing in the nid of the node that you are calling viewfield from? there was a patch for 6, but nothing for 5.

 
 

Drupal is a registered trademark of Dries Buytaert.