blog logo
[ultimatesocial count="true" networks="linkedin,facebook,twitter" url="" skin="minimal"]

Content Management in Demandware: Content, Content Slots, and Empowering Your Designers

Steve Susina • November 13, 2013

Demandware offers a robust Content delivery model that will allow dynamic site changes in a short period of time without requiring code deployments or other costly involvement.  This post will address the different methods to supply Content through the Demandware Business Manager to your site.  It will advise when to use Content instead of Content Slots, and also provide a methodology for applying styles via a style sheet that lives inside of a Content Slot.

Content Object

First, let’s discuss the Content object.  In Demandware, the Content object is an extensible object that can be adapted to meet almost all conceivable needs of pages that serve static content.  Privacy Policies, FAQ Pages, Contact Us, Shipping Policy – all of these are examples of items that are best driven from Content Objects.


Content Objects contain attributes for controlling SEO attributes, whether or not to include that Content Asset in your Sitemap, and an editable HTML field.  Furthermore, this object, being extensible, can have any number of Custom Attributes assigned to it for additional needs.  Once this content asset is referenced in code, all that is needed to change a page is to edit the Content.  The best benefit to this is that the site cache is not entirely cleared as it is when a code deployment occurs.  Have a typo in the Shipping Rates, or an adjustment to the Privacy Policy is needed?  Just update the content, and in 15 minutes, those changes will be reflected in the page views without requiring all pages to be re-served.


Content Slots

In addition to Content Objects, the Online Marketing section of Business Manager holds a section for Content Slots.  Content Slots are schedulable, and have several different options for what to display.  First, these can hold plain HTML.  Whatever markup is entered when this is selected will display in the designated area of the page.  The downside of this is apparent in that malformed HTML can effectively break the page layout.  However, use of Demandware’s Storefront toolkit ability to change the display via the Site Preview controls should effectively eliminate this danger.


Additionally, there are options for displaying a Content Asset, a set of Products, or a list of Categories.  Furthermore, developers can extend this functionality by creating new rendering templates within the codebase in the templates/default/slots/{type} directory.  Need a new type of Product grid?  Then have a developer program a new template in the product subdirectory.   Site Genesis comes preloaded with carousels that take a list of products or categories and renders a jCarousel.  All that is needed is a delimited list of categories or products that can easily be selected in the interface.


Content Slots can also be context-sensitive.  This means that they can be assigned to appear differently when appearing in different Categories.  A drawback to this is that the Context-sensitive nature only applies on that context-object’s landing template.  Intuitively, you may think that you could apply a context sensitive content slot (such as a promotional banner) to a location that is dealing with that particular object (the bottom of the dropdown menu for the top-level categories, for example).  This is not the case, however.  To accomplish this, create “global” content slots that are easily identified in the interface as dealing with a particular category.


Things to keep in mind

Despite their similar names, the directory structure for each is different.  Content Assets access the Site Library, while Content Slots access the library assigned to the Organization.  This means that the creator has to be mindful of where he or she is uploading their assets needed for reference.  Also, if referencing an already on-site asset, if the asset lived in a Content Slot, then a Content Asset cannot see it and vice versa.


Another consideration is the fact that if a style is needed (either changed or brand new), then one of two things must happen: the codebase where the style lives must be updated, or an inline style must be used.  Inline styles are frowned upon for validation purposes.  Content allows you to specify a CSS file in the Site Library, so a deployment may not always be necessary, but what about Content Slots using regular HTML?  If a new style rule is required, then the primary benefit (no code deployment) of using these objects is lost.  Such a scenario is where the next section helps.


Using a Content Asset as a Stylesheet

One thing to note is that, in SiteGenesis, the Content object allows for a specified CSS file in the Site Library.  This CSS in injected after the page loads.  But what if you a Content Slot is being used, or you don’t want the site to wait for the web to serve the page before loading additional CSS?  The beautiful thing about Content’s Body attribute holding HTML is that CSS is really just a differently interpreted form of HTML.  By using style rules in a Content Asset (or building a link tag to file in the Site Library), then including that Content Asset via the <iscontentasset> tag in the htmllink.isml template, you can have Designer/Marketing controlled CSS style declarations that are injected into the head of your document and do not require a full code deployment.  This way, classes can be applied instead of inline styles, then defined in your Content Asset based CSS.  Therefore, no costly, time consuming code deployment to get a handful of new style declarations will be needed.



In closing, Content Management in Demandware gives non-developers unprecedented control over their site layout and appearance.  Determining when and how to leverage these options will result in a highly adaptable and agile site that will develop amazing user experiences and relationships.


To learn more about the demandware + lyonscg solution, visit our demandware partner page.


Steve Susina

About the author

Steve Susina

Subscribe to our blog

Let's discuss the next step in your commerce journey.

XSchedule a meeting