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 |
Jump to:
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
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
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
#4
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
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
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
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
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
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.