Personal tools
  • We're Hiring!

You are here: Home Documentation Previous versions OME Server Custom Annotations Syntax

Syntax

HTML Templates - Syntax

The Perl packages that handle the templates write template variables in a certain way. Here is a quick explanation of how to manipulate the templates.

All template files have the following lines of code (of course, the numbers will be different because they're IDs):

<TMPL_VAR NAME="CategoryGroup.load/id-[9216,9218,9215,9217]">
                    <!-- 9217=EmbryoStages,9216=GeneSymbols,9218=ProbeNames,9215=ProbeTypes -->

This tells the Perl script to load only those IDs, in that order (GeneSymbols, ProbeNames, ProbeTypes, EmbryoStages).

You can display this information in two ways: individually, or through a loop. To use a loop, do this (taken from an AnnotationTemplate file):

                    <TMPL_LOOP NAME=cg.loop>
                    <TMPL_VAR NAME=cg.Name>
                    <SELECT name="FromCG<TMPL_VAR NAME='cg.id'>"><OPTION value="">Do Not Annotate</option>
                    <TMPL_VAR NAME=cg.cat/render-list_of_options></select>
                    <input type="text" size="15" name="CategoryAddTo<TMPL_VAR NAME='cg.id'>" alt="blank">
                    </TMPL_LOOP>

Please note that there is no formatting included in that code snippet - you can play with tables yourself to determine layout. The automatically- generated template files use OME tables and provide useful examples.

To display information individually, follow this example taken from a DisplayTemplate file (again, no formatting included):

                    <TMPL_VAR NAME=cg[1].render-ref>
                    <TMPL_VAR NAME=cg[1].cat/render-ref>
                    <TMPL_VAR NAME=cg[1].cat/Name>
                    
                    <TMPL_VAR NAME=cg[2].render-ref>
                    <TMPL_VAR NAME=cg[2].cat/render-ref>
                    <TMPL_VAR NAME=cg[2].cat/Name>
Document Actions