By mikki2 on
Hi,
Is it possible to show the node links ($links variable) on the search result just as it shows on the full node? I use the Flag module(and others that use the links) and my users have asked if they can flag items in the search results instead of first visiting the full node to flag. This will be a key addition since search is the main feature of my site and users spend 90% of their time searching.
I've searched for this but can't find anything on this. Can anyone help me with this or point me in the right direction?
Thanks!
Comments
Anyone have an input?
Anyone have an input?
Probably, with some
Probably, with some work.
First, notice there is a file called search-result.tpl.php in the modules/search folder. Copy that to your theme folder, and empty your cache, and you can now theme search results as you like.
To actually add the link, check this out, specifically the part about Using flag_create_link():
http://drupal.org/node/295383
Looks like in that template
Looks like in that template file, this will do the trick:
You may want to change the title of this issue to "Display flag link in search results" so that other users can find this issue easier.
Thanks I'll try that out.
Thanks I'll try that out. I'll post my result
works like a charm
Was looking for a solution in D6 to put a flag link in search results, this worked like a charm when added to the search.result.tpl.php. Thanks for sharing!