Body variable in PHP Custom Field

spoonfinger - July 3, 2009 - 14:32
Project:Views Custom Field
Version:6.x-1.0
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I guess all is in the title, I would like to test the value of node's body in a PHP custom field, but it seems that there's no body variable so that I can do it.

I've even tried print_r($data) command, but can't find anything which looks like the actual node's body my view refers to.

So if there's is such a variable, that I might stupidly miss, I'll be grateful taht you give me, and if not, if there's any other way wiche let me test my body into a custom field.

#1

casey - July 3, 2009 - 15:35

Did you add the body field to the view? After that you could exclude the body field from displaying using the "exclude from display" checkbox.

#2

spoonfinger - July 15, 2009 - 07:56
Status:active» fixed

That was the problem...

I had added the body field in the view at once, but after the custom field, so it couldn't see it, thank you for your help ^^

PS : the actual variable is $data->node_revisions_body ;)

#3

casey - July 6, 2009 - 16:56
Component:User interface» Documentation

#4

System Message - July 29, 2009 - 08:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.