Hi to all, I need to create a new custom formatter(using the module custom formatter) to replace some template code. So, for some fields, When I add a new custom formatter(field type: text) I need to print the title and the body. I tried to use $node->title but it doesn't work... How can I do this? Probably using elements? And if yes...how? Thanks in advance, Regards, Michele
A:
Field formatters relate to the field that they are used for, it it's impossible to answer your question without know what field you are using (and it's contents).
To debug this, you could use the devel module and a bit of code. If you in your formatter write.
dpm(get_defined_vars());
this will give you a pretty printed list of all variables you have available. That should help you inspect and figure out how you get to what you need.
googletorp
2010-08-10 12:40:45
Thank you very much!
morticcino
2010-08-10 12:53:37