Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You will also need to install the Drupal Apache Solr module (https://drupal.org/project/apachesolr).  The Drupal Apache Solr module installation says to copy it's its Solr configuration files to the Solr configuration directory, . Do not do this as you will be overwriting your existing Islandora Solr configuration.  Instead update the existing schema.xml file with the required Drupal fields (it's good practice to backup any files before you edit them if they are not already under a vcs, even better try it on a dev/test install first).

...

Code Block
languagephp
titletheme_preprocess_islandora_solr
collapsetrue
function bartik_preprocess_islandora_solr(&$variables) {
	$results = &$variables['results'];
		foreach ($results as &$result) {
			if (!empty($result['solr_doc']['bundle_name'])) {
			$path = url('http://aurltothethumbnail'); //could check bundle for type and link to thumbnail for each type
			$options = array('html' => TRUE);
			$options['attributes']['title'] = $result['solr_doc']['label'];
			$image = theme('image', array('path' => $path));
			$key$result['thumbnail'] = l($image, $result['solr_doc']['url']['value'], $options);
		}
	}
}

...