Hello everyone
Im trying to output the values from a line of specific fields in my custom content type. I've copied the search-result.tpl.php to my template to modify it.
I have found several posts about how to do it in D6, but Im not having success with it in D7 (nor finding posts about it).
For example I have a field called field_venue (in my custom content type) and I really want to output the value of that field in my search-result.tpl.php.
I've tried to output the value with the following:
print render($result['field_venue']);
and (which works in my node view, e.g. node--mynode.tpl.php)
print render($content['field_venue']);
Neither of the above works in my search-result.tpl.php, unfortunately.
What am I missing?
Thanks, in advance.
Tue
Comments
Does anyone have any clue how
Does anyone have any clue how to fix my issue? :)
Thanks.
the drupal way to render images
Did you figure this out?
The only way I have found to get images into search results in D7 is :
but this doesn't seem to be the right way to do it. First of all because of node_load, and of course this image is not run through 'image_styles' ..
so, i did get it working!
lucky i found this: http://www.zites.net/en/drupal-7-theming-and-image-path