// you’re reading...

CMS

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?

Share and Enjoy:
  • Print
  • email
  • Twitter
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • MisterWong
  • Facebook
  • LinkedIn

No related posts.

About the author:

Markus Giesen Markus Giesen is a Solutions Architect and RedDot CMS Consultant, formerly based in Germany. Travelling around the world to find and offer solutions for a better world (in a very web based meaning). He just found a way to do this as part of a Melbourne based online consultant house. On this blog Markus shares his personal (not his employers) thoughts and opinions on CMS and web development. In his spare time you will find him reading, snowboarding or travelling. Also, you should follow him on Twitter!

Discussion

4 comments for “Element naming conventions for RedDot CMS”

  1. Vielen Dank, sehr n├╝tzlich! :-)

    Posted by Andreas B. | March 24, 2010, 3:10 pm
  2. We use a similar naming convention, with the exception that we use “lst_name” and “hlst_name”. We still have yet to use some of the placeholders so this is a good resource. Thanks as always Markus.

    P.S. – I posted a comment on the Duplicate Content thread recently. When I went back, the comment was gone.

    Posted by Joel | May 14, 2010, 2:59 pm
  3. We have the same, but don’t distinguish an image anchor and use inf_ for info.

    Also, we use upper camel case for the bit after the _

    e.g. hdl_Headline, opt_MetaClassification

    Posted by Robert Moore | July 11, 2010, 7:07 am
  4. We always went a bit further regarding Standard Field elements. I found that it helped for multi-lingual websites to identify labels on a page as lbl_name. This let people know that even though it is a standard field, it is not shown in the form and it needs to be translated. We did the same for emails, dates, and any other structured standard field item.

    Posted by Emily Stange | November 22, 2010, 1:02 am

Post a comment



Stay up to date! - Get notified about followup comments

If you don't feel the urge to comment but wish to stay in the loop:
Just enter your email and subscribe to new comments.

Subscribe without commenting

Recent Tweets

  • RT @AirKraft: Transport Canada breakout: they manage 80K pages and 300K assets with WSM(RedDot). Wow! #OTCW 2010-11-11
  • The RedDot usergroup session 'Future of WCM' is in National Harbor 7, now. See you there! #otcw 2010-11-11
  • RT @yttergren: @AirKraft: Calling all WSM(RedDot) devs: share your solutions on http://bit.ly/bgPIof EVERY solution can win an iPad #OTCW 2010-11-10
  • Come to the Solution Exchange session. Enhance your (#reddot) CMS project! Chesapeake 12, 3:20pm #otcw Looking forward to see you there! 2010-11-10
  • More updates...