Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2009 at 20:16 UTC
Updated:
4 Nov 2009 at 17:18 UTC
Is there any way to get PHP working in "Rewrite the output of this field"?
I want the output to be rewritten ONLY if the field is NOT empty. But currently it will always rewrite regardless of what is in the field. Anyone how to do this?
Thanks!
Comments
Comment #1
Kakulash commentedI'm marking this as closed. Wish I had seen this post sooner: http://drupal.org/node/433318
You can hide empty fields in latest dev version. Thanks again merlinofchaos!
Comment #2
ussher commentedalso looking for this functionality, but not to display/hide.
im wanting it to tag a tab as current if the NID is the same as the current second argument.
/user/(user_id)/my_content/(node_id)
/user/67/my_content/1
/user/67/my_content/2
/user/67/my_content/3
is the urls of the content created by this user along with the node id.
The replacement pattern is the url for the other nodes. I want to be able to add class="current" if the second argument is the argument for this link, but need php to evaluate in the "Rewrite the output of this field" to see if [nid] == %2 then print "class=\"current\" "
Comment #3
brush commented+1
any guidance on where the php is getting filtered out, so as to allow it? i'll post patch if i get it working...
Comment #4
brush commentedComment #5
merlinofchaos commentedSorry, in the past I have rejected this, and I will continue to reject this.
Comment #6
quinn-2 commentedIf anyone has a patch for this, i would be interested.
Comment #7
jmaties commented+1
Comment #8
merlinofchaos commentedI am locking this thread. If you want PHP, theme it. I will not add PHP to the rewrite, and +1s and subscribes only serve to spam.