Arctos Developers Guide
Tips, tricks, and conventions for developing Arctos code
Arctos is written primarily in CFML and HTML.
#is a special character;
#variable#means render variable
#used as text (eg, as an anchor in a URL) must be escaped.
someURL.com#anchormust be written as
- outside of
#is just a character.
- make internal URLs relative -
- use DataServices/Linkerizer to build URLs. There are currently three classes of URL supported:
- no class–>default browser behavior
- external–>”pop out” image appended, open in new window
- newWinLocal–>”info” image appended, open in new window (use for links to arctos.museum information pages such as code tables)
- when possible, use /includes/style.css for styling. (Directions for minimizing are inline.)
- for one-off use, in-page CSS (
<style></style>tags) is acceptable but less preferred
- avoid inline styling (
<div style="...."></div>); this makes it very difficult to change things and keep a consistent look and feel
Recommended Code Editors
A CFML Support - ColdFusion 11 extension is available for Brackets.
Arctos uses various datasources for various reasons. Most queries should be one of two entries:
user_loginlogs in to the database as the Arctos user. This connection must be supplied with valid credentials.
cf_codetablesis a special pre-authenticated user who has SELECT on ct* tables. This user should be used for all possible connections which SELECT from codetables, for performance reasons, and these queries should always be set to cache. The query name should always be the name of the code table to further support caching. For example:
<cfquery name="ctdatum" datasource="cf_codetables" cachedwithin="#createtimespan(0,0,60,0)#"> select datum from ctdatum order by datum </cfquery>
This toggles MULTIPLE for a SELECT of id “accn_status”:
<span data-ctl="accn_status" class="ui-icon ui-icon-arrow-4-diag expandoSelect"></span>
Button + HREF
<a href="somepage.cfm"><input type="button" class="lnkBtn" value="Some Text"></a>
Code Table Definer
<span class="infoLink" onclick="getCtDocVal('cttaxon_name_type','taxon_name_type');">Define</span>
cttaxon_name_type is the relevant code table and
taxon_name_type is the ID of the element being defined.
Or as a label
<label class="likeLink" onclick="getCtDocVal('ctcataloged_item_type','cataloged_item_type');" for="cataloged_item_type"> Catalog Item Type </label>