function theme_tripal_feature_search_results
1.x tripal_feature.admin.inc | theme_tripal_feature_search_results($node) |
This function is an extension of the chado_feature_view by providing the markup for the feature object THAT WILL BE INDEXED.
Related topics
1 theme call to theme_tripal_feature_search_results()
- chado_feature_view in tripal_feature/
tripal_feature.module - This function customizes the view of the chado_feature node. It allows us to generate the markup.
File
- tripal_feature/
includes/ tripal_feature.admin.inc, line 603 - @todo Add file header description
Code
function theme_tripal_feature_search_results($node) {
$feature = $node->feature;
$content = '';
// get the accession prefix
$aprefix = variable_get('chado_feature_accession_prefix', 'FID');
$content .= "Feature Name: <h1>$feature->uniquename</h1>. ";
$content .= "<strong>Accession: $aprefix$feature->feature_id.</strong>";
$content .= "Type: $feature->cvname. ";
$content .= "Organism: $feature->common_name. ";
// add the synonyms of this feature to the text for searching
$synonyms = $node->synonyms;
if (count($synonyms) > 0) {
$content .= "Synonyms: ";
foreach ($synonyms as $result) {
$content .= "$result->name, ";
}
}
return $content;
}