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

Kakulash’s picture

Status: Active » Closed (fixed)

I'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!

ussher’s picture

Category: support » feature

also 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\" "

brush’s picture

+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...

brush’s picture

Status: Closed (fixed) » Active
merlinofchaos’s picture

Status: Active » Closed (won't fix)

Sorry, in the past I have rejected this, and I will continue to reject this.

quinn-2’s picture

If anyone has a patch for this, i would be interested.

jmaties’s picture

+1

merlinofchaos’s picture

I 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.