Personal tools
  • We're Hiring!

You are here: Home Documentation Previous versions OME Server Custom Annotations Customizing Display Example

Display Example

Here is an example of how to customize your display template by adding a link to an external database. We only want to query the NIA Mouse Gene Index (MGI) for GeneSymbols and ProbeNames.

Find the template: This particular template should be in your "/OME/html/Templates/Display/One/OME/Image/" directory. The others are stored in "/OME/html/Templates/Actions/Annotator/CategoryGroup/" and "/OME/html/Templates/Browse/CategoryGroup/".

To add links, it is best to render each row of the table individually. To do this, you should remove the loop and uncomment the rest of the code.

Now, add another column to the table - in the first row (<tr>row 1</tr>)

<td class="ome_td" align="left"><center>MGI Link</td>

In the 2nd and 3rd rows, you can add your link:

<td class="ome_td" align="left"><a href="http://lgsun.grc.nia.nih.gov/geneindex5/bin/giU.cgi?
            search_term=<TMPL_VAR NAME=cg[1].cat/Name>" target="new">Query</a></td>

Make sure you're calling the category name that you want.

Here's the final product:

Document Actions