Site Creation Best Practices
Use a naming convention
Naming conventions within the site maintains order and helps developers identify components for reuse. Reusing components reduces the number of components that must be maintained.
Create reusable components
One of the strengths of Web Content Management is in the component model of Web pages. When developing a site, it is important to keep this concept in mind. Each of the components that a developer creates can potentially be reused in other pages, and each component should be built to be reusable and modular.
Before creating a new component, check if one like it already exists. Examples of reusable components are: the page header and footer, menu headers and footers, menu and navigator layouts, the HTML header, and JavaScript declarations.
Refer to the Redbook 'IBM Workplace Web Content Management for Portal 5.1 and IBM Workplace Web Content Management 2.5' for further examples
Include components on the site and site areas to handle special needs, such as an image tied to site area, personalization rules, and special characters in navigator.
Components added to sites and site areas can give each site a unique presentation. For example, each department site could have an image of the Department Executive or the latest team picture. Reference components could also be added to include personalization or a menu component to display a list of content for the site. Unique stylesheets and logos could also be stored on each site to give multiple sites a different presentation.
Use generic names for any components that are potentially going to be reused in other sites.
A company has five intranet sites each with the same layout, but a different logo and color scheme. A presentation template called "Three PanePresentation" can be reused for each intranet site, so that there is one place to make any changes.
The logo and stylesheet can be stored on the site and referenced by the presentation template to give the intranet sites their unique appearance. A presentation template created in one intranet site called "Finance IntranetPresentation" limits its reuse by other intranet sites.
Modularity
All objects should preferably be modular, meaning that they should not rely on any other object. For example, an object should not rely on another object to close a table tag or put script tags around it. All functionality should remain within the component that needs it -- either directly coded in it or in the form of another complete component. Components that unnecessarily rely on other components are extremely difficult maintain.
Use HTML components for item layouts
It is more efficient to create HTML components that contain the layout for menus and navigators. For example, create HTML components named ItemLayout-TitleDateSummary and ItemLayout-TitleSummary to enable reuse of these components, and enabling a single place to make changes.
Use Page Navigation Components for paging of menus, navigators and search results (v6.0+)
Page Navigation Components should be used when a large number of results are likely to be returned by a menu, navigator, or search operation, to page through the results. Long lists of results make large amounts of HTML which make the pages slow to load and render.
Note that Page Navigation Components are not supported with Personalization components at this time.
Use stylesheet components (v6.0+)
Rich text fields should be configured to use a stylesheet to control the presentation of content entered by authors and enable easy changing of the styles at any time.
Consider the use of a library prefix when defining component references (even if you only have one library)
If you only have one library, technically you do not need to prefi x c
omponents with the library name. However, you should use a prefix to allow for creation of new libraries in the future and avoid any confusion as to which library is being used.
You might not want to use a prefix if you plan to (or are) using multiple libraries to create self-contained content where all referenced objects are within the same library.
To specifically target the current library, use "./" as the prefix.
When using the current library prefix it is recommended that you specify the item by it's full path, for example use "./site/sitearea/item" instead of "./item" as this syntax results in a faster lookup of the item during render time.
Add site area presentation or authoring template mappings to the highest level in the site
Authoring and presentation template mappings are inherited from the parent site, so specify the mappings at the highest level in the site, and always assign default content and lock it, to avoid deletion. By having all the mappings in one place it makes maintenance easier because there is one place to find and change mappings.
Always assign default content to sites and site areas
Assign default content to sites and site areas to avoid incorrect links in navigators and when creating manual links to site areas. Consider locking the default content to stop it from being deleted or modified without administrator approval.
Note that in Workplace Web Content Management version 6.0, if default content is not defined, then the first content item added to the site area is displayed.
Use the Apply Template button to apply authoring template changes
After content is created with an authoring template, when changing the authoring template to include new components, it is easier to reapply the template to the content than to add the new components individually to the content.
Separate content and component presentation when displaying content in a portlet
When creating presentation templates to use when displaying Web Content Management content within a portlet, reference just the content you would like to display. Components, such as menus and navigators, should be displayed in separate portlets and linked to the Content portlet as required.
Use Link Components for all internal and external links (v6.0+)
Link components should be used for all external URL links and internal WCM links.
Use inline editing to allow editing and authoring of content from within the site (v6.0+)
Inline editing improves the authoring experience by allowing them to edit and create documents from menus, navigators or content. It is recommended that inline editing only be used in authoring environments to avoid syndication conflicts when the same items are edited in more than one environment.
Enter html into the No Results field for menus (v6.0+)
Enter a message or hidden html to display if the menu returns no results. It assists with troubleshooting if there are problems with the menu.
Avoid loops
When creating dynamically generated content using Components such as Menus or Navigators, it is essential that the data returned by these components does not contain any references to the Component itself.
Content Creation Best Practices
Use the Insert Image button to add images to presentation templates and HTML or rich text fields
Content creators can insert images into HTML and rich text components using the Insert Image button. The image can be selected from the image library or selected from the file system and uploaded by the author into the image library
Using the Insert Image button allows the image size to be overridden when creating the link.
Don't use the name of the site area in the content name or display title
Use the content by site area view to show
content by site area. If it is entered into the content name it is confusing when content is moved or linked to more than one site area.