I'm working on an OG version of Swish-e. In the search results, I'd like to include the name of the group in which the "containing node" belongs.
I followed instructions here http://drupal.org/node/86987 for Customizing the search results and added a 'group' item to my theme. I've tested it and it works with a normal "hook_search" formatted more or less like node_search.
But, I can't get it to work with my modified version of Swish-e. For arguments sake, we can assume that all the hook_search code is the same as in swish_search, with the exception of additional code that obtains $group_node. This should be all I need:
$find[] = array('link' => $link, 'title' => $title, 'group' => l($group_node->title, 'node/'. $group_node->nid), 'snippet' => $snippet, 'extra' => $extra, 'node' => $node);
But, it's not working. The search results are not altered in any way.
I'd also like to change the text that says "Containing node" to something else.
Any suggestions?
Comments
Comment #1
somebodysysop commentedNever mind. I found it. It's in swish_theme.inc. I couldn't find it because I was searching for "containing", and my search was case sensitive. So sorry!