I am using the Search file attachments module (which searches for text from pdf files after they are indexed), and everything works fine.
But I would like in Search result to display link to the content (where I uploaded the file) not link to the PDF itself, so that the user goes to that page and from there he can choose to see the PDF.
I am still new to Drupal, but from what I have read that I have to alter $search_results
in search-results.tpl.php
and use template_preprocess_search_results()
to display what I want (not sure if this is the right way) or is there another way to this?
EDIT:
I found that I could edit search_file_attacments.module
and there is the link attribute in $results[]
I just have to figure out how to get nid (so I can get the url) from fid