Reviewed & tested by the community
Project:
Views Custom Field
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Sep 2010 at 13:58 UTC
Updated:
2 Dec 2017 at 15:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ericpai commentedI'd like to know this also.
Comment #2
d0ublej0 commentedThis module doesn't support to access any other variables in the custom php code then $data and $static; I've modified the views_customfield_handler_field_phpcode.php (ref attached patch) and it's working fine ;)
Comment #3
newsoul_br commentedMan ! You saved my life !
Thanks a lot !
Comment #4
ambereyes commentedThis patch adds a $args array which is freaking brilliant!
And I think it should be added to the project.
My 0.2 cents!
Comment #5
capellicIndeed -- this should certainly be the module.
Comment #6
YK85 commentedsubscribing
Comment #7
socialform commentedI think this patch allows me to do what I want... which is do something with the args.
I'd like to highlight a row (via inline CSS) if the row's nid matches the argument nid.
Basically, i have an global:null argument (so the argument is ignored and all nodes are shown) passing a nid argument to the view.
Can anyone suggest some php that would print inline css if the row's nid matches the argument? Thanks.
{edit}
ok figured it out...
if ($args[0] == $data->nid) print 'some css';thanks for the patch and module!
Comment #8
savedario commentedThanks for the patch.
I was wondering... did this ever make it to the official release or is it still only in dev ?
Comment #9
marko b commentedAlso wondering will this be in some release? This is very useful.
Comment #10
icanko commentedThis patch is 1 year 9 months and 12 days old yet it isn't added neither to dev 6.x, neither to the new Views PHP module for Drupal 7. Any ideas why?
EDIT:
I answered my own question in an issue for Views PHP - http://drupal.org/node/1352728#comment-6287060 .
Although the functionality is already there, I think this patch is useful in that it adds information to the "Available variables" section.
Comment #11
jvieille commentedMany Thanks!