• RedDot CMS Blog
  • 18.10.2019
  • EN

rdb: Element naming conventions for RedDot CMS

This article covers basic rules on how to name elements when creating RedDot CMS templates.
If you have ever opened up a template and then looked at elements named “TopLeft”, “Home”, “GreenSeparator” you know what I mean. To make things easier you should add a prefix.

Using a name convention for RedDot CMS elements saves time

So the named examples above become:
“TopLeft” » “con_header” – describing a header,
“Home” » “anc_home” – a link pointing to the homepage,
“GreenSeparator” » “bg_separator” – a separator background.

Now there is no need to open up each element and check the attributes to see what they do. The prefixed name unveils the element type. I have used naming conventions since several years now and it saves me a lot of time.

Name convention list

Using the following list with CMS element naming conventions to enable CMS users to quickly determine element types:

  • Anchor: anc_name
  • Anchor, graphic: ancimg_name
  • Area: area_name
  • Attribute: att_type
  • Background: bg_attribute
  • Browse: brw_next and brw_back
  • Container: con_name
  • Database content: db_name
  • Frame: frame_name
  • Image: img_name
  • Hit List: hitlist_name
  • Headline: hdl_name
  • Info: info_name
  • List: list_name
  • Media: med_name
  • Option list: opt_name
  • Standard field: stf_name
  • Text: txt_name
  • Sitemap: sitemap
  • Transfer: trn_name

Using a Web Solutions Content Management Server (CMS) element naming convention to enable CMS sitebuilder to quickly determine an element type without checking its properties is a common best practice. By using a common set of element names you will save time and avoid templating mistakes when working within a collaborative team of RedDot developers where everyone speaks the same “templating language”.

Do you use conventions?