0

I have this piece of code that was in a Drupal 6 Views 2 customField PHP that I need to port to Drupal 7 Views 3 in a Global: PHP field but I can't figure why I get an empty ajax error upon building this code in the Global: PHP field value code.

Did the accessibles variables changed?

<?php
//var_dump($data);
if ($data->node_type=="project") {
echo "node/".$data->nid;
}
else
{
echo $data->node_data_field_slider_include_field_slider_link_value;
}
?>

ANSWER

You need to remove the <?php ?> tags.

1
  • Hi, welcome to DA! :) Please, post your answer as an actual answer below, so the question can be marked as answered, or it's gonna litter the unanswered queue for no particular reason. :) – Letharion Apr 18 '13 at 11:07
0

You need to remove the <?php ?> tags.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.