Hi,
I would need to store the count of words in the node body into the computed field but I do not know which variable should I use to get the content of the node body for calculation.
Thanks a lot.
Petiar.
Hi,
I would need to store the count of words in the node body into the computed field but I do not know which variable should I use to get the content of the node body for calculation.
Thanks a lot.
Petiar.
Comments
Comment #1
Moonshine commentedYou should be available to get to it via $node->body
Off hand you could probably get away with something like:
Comment #2
bwo commentedI have the same problem. Unfortunatelly, using $node->body you don't get only content of actual body field, but also of all the fields you enable for display in "display fields" settings. I guess to get only the body field one should use $node->content['body']['#value'], but it doesn't work for me... Does anyone know how I can use this variable in computed field?
Comment #3
mmjvb commented