This post focuses on naming conventions that developers can leverage in their Site Studio environments. This post is part of a blog series exploring best practices to consider when planning for and building a Site Studio website. Unlike my Getting Started with Site Studio post, for this series, I’m assuming you’re already working and fairly familiar with Site Studio - which is part of the Oracle WebCenter Content (WCC) offering.
Content Server Instance Naming
With a standard document management implementation, it is typical for Content Server instances to having naming conventions similar to UCMDEV, UCMQA, and UCMPROD. However, for a WCM (Web Content Management) implementation it is recommended to instead use a different naming convention, such as a numbering scheme. For example, WCM1 (for a DEV instance), WCM2 (for a QA instance), etc. This is done so as to avoid confusion when migrating content between environments. Otherwise, users have a tendency to get confused or apprehensive when they see production-ready content with “DEV” or “QA” in the Content ID name. With the naming scheme, they will instead see references to WCM1, WCM2, etc.
Site ID Naming
When creating a new site, you must specify a Site ID. Use only alpha characters. Do not use any special characters such as an underscore ( _ ), since that may cause an issue in Site Studio Designer where your assets will not be listed from the Site Assets pane.
Site Asset Content ID Naming
Content ID (dDocName) naming conventions for site assets are important since Site Studio Designer uses the asset’s Content ID as the display name in the IDE (Integrated Development Environment).
The Content ID prefixes referenced below are examples of the standards that could be put into place. You may want to reference a website name in the prefixes below, but you may not wish to do so if you plan on reusing any of the site assets across multiple websites. Note that Content ID’s are limited to 30 characters.
- Page Templates:
- For Home Page: TPLT_HOME_
- For Primary Pages: TPLT_PPAGE_
- For Secondary Pages: TPLT_SPAGE_
- Subtemplates: STPLT_
- Region Templates: TPLT_REG_
- Region Definitions: DEF_REG_
- Placeholder Definitions: DEF_PH_
- Element Definitions:
- For Plain Text elements: ELMT_TXT_
- For WYSIWYG elements: ELMT_WYSIWYG_
- For Image elements: ELMT_IMG_
- For Static List elements: ELMT_SLIST_
- For Dynamic List elements: ELMT_DLIST_
- For Custom elements: ELMT_
- Custom Element Forms: CUST_FORM_
- Scripts: JS_
- CSS: CSS_
- Images: IMG_
- Fragment Libraries: LIB_FRAG_
- Contributor Data Files: <system generated Content ID>
Placeholder Definition Mapping Naming
When you associate a mapping name for your Placeholder Definitions (Tools -> Define Placeholder Definition Mappings in Site Studio Designer), it is recommended to specify user-friendly mapping names since they are displayed to an end user contributor while in Contribution Mode. For example, if the Content ID for a Placeholder Definition is DEF_PH_ALL_ARTICLES, then you could use a more friendly mapping name of ALL_ARTICLES. (Note that spaces are not allowed in mapping names.)
While it is possible from Site Studio Designer to filter out and display only the Fragments that are associated with the currently connected site, it is still recommended to specify a prefix for the Name of the Fragment of either the project name, website name, or company name. This will make it easier to visually tell from the Toolbox window of Designer which Fragments are custom. Also, since Fragments are sorted alphabetically and listed by their user-friendly Name, a common Name prefix will group the Fragments next to each other.