Common Model Elements
A number of elements are repeated across the AceDB schema. To make the external model easier to maintain, fetching and parsing of these elements is stored in one place and accessible to all models. All external models automatically inherit the following:
|Expected AceDB model tag||Object.pm method||config field||template macro|
|"Name" (indirect, returns name and ID of object)||name()||"fields name"||name|
|"Common" (indirect, returns the public name of an object if one exists)||common_name()||"fields common_name"||common_name|
Here's how to use them.
1. Be certain to add the appropriate configuration to wormbase.conf (eg "fields remarks") to make the data accessible in your template.
2. Add stub documentation in your model for the shared field. (THIS STEP SUBJECT TO CHANGE)
3. In the appropriate template, include the macro. Some macros take optional parameters.
[% remarks %]
It's important to be consistent with where we place things on the filesystem since it makes it easier to find things, and easier to handle proxy redirects. Here are some rough guidelines.
Temporary images and files
Temporary files should be placed outside of the document root. This includes any files that need to expire at the end of a given release cycle.
Please consolidate style information into one of the existing stylesheets or creat a new one if necessary. Please try to avoid using style information inline in a document.
Constants should be defined in conf/elegans.pm.