Shared Content Objects

Use shared objects where you want to display the same content on many pages throughout the site. A good example of where to use a shared object type is in the copyright statement often found at the bottom of a web page. This can contain any copyright information and often address and telephone and is usually the same on every page of the site. If that content is changed on one page, it should be changed on all others as well.  Another common example is a news announcement you want on multiple pages.  In this case, the news item may only be shown in a couple templates, but have the same information in each of the pages made from those templates.  Finally, sub-navigation for a specific template is a common use of shared content objects.  In this case, only one template is using the shared object, and all pages using that template show the content. A shared object type is shown below:

<cfmodule template="../actionfiles/createcontentobject.cfm" Title="SharedModuleName" ObjectType="Shared" basetemplate_name="#url.basetemplate_name#" page_ID="#url.Page_ID#" stylesheet="#stylesheet#" bgcolor="ffffff">

There are three attributes to edit:

  1. Title: The title given to this object.  Make this unique if the object isn't shared.

  2. ObjectType: This determines if the content in the object will be shared with other content areas.  See Unique Content Objects for more information.

  3. Bgcolor: This is the default background color shown in the editor.  The default is ffffff which is white. (standard hex colors without the #).  Change this to a different color if you need the editor to preview differently. Such as if you have a footer area that is dark blue, with white text, and you want the editor to preview as such.

NOTE: If sharing a module and content between templates the Title needs to be the same on each template using the shared module. Rename the title to reflect the content area, for example: CopyrightStatement. Please do not use spaces in the object title name and remember that the name needs to remain the same on all templates sharing that content.