Passing Replacement Patterns no PHP code

rucativava - July 1, 2009 - 09:45
Project:Views Custom Field
Version:6.x-1.0
Component:Documentation
Category:support request
Priority:critical
Assigned:Unassigned
Status:closed
Description

Hello!
I am trying hard at this for two days now, and I think the time has come to ask for support! I think the image is quite self explanatory, but I will explain in verbally, if not only to make it accessible to search engines.

I am having real difficulty passing the values normaly output by Replacement Patterns such as [filepath] (which work fine in normal Views2 fields) to a Custom Field using PHP. Documentantion tells me $data: contains the retrieved record from the database (e.g. $data->nid). so I assumed replacing the "nid" by whichever Replacement Pattern I had summoned in fields above. It is not working.

I am afraid that maybe this is a deeper lack of knowledge about Drupal/PHP, but I can't even tell that. I have managed to write something in PHP and Javascript. and things have been working... but this one I cannot figure out.

Thank you for any help.

AttachmentSize
Edit view projectlistcronologia | NGM alpha.png111.61 KB

#1

casey - July 1, 2009 - 10:29

Try using print_r($data) first.

#2

rucativava - July 1, 2009 - 14:10

Thank you so much!
I've been usng that tip, but for some stupid reason, i put a php command in my template, and now I understand: it printed variables that had to do with the template. Now that I wrote echo '<span class="list-obra">' . print_r($data) . '</span>'  I see all the beautiful variables I needed, with strange names I would never guess.

Thank you again for your reply. :)

#3

casey - July 1, 2009 - 16:26
Status:active» fixed

#4

System Message - July 15, 2009 - 16:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.