Correctly Structuring Data
There are several similar concepts in the Broadleaf CMS that can all be utilized to achieve various tasks. Different methods are better for different things, and below we'll describe the ideal tool for eCommerce content use cases.
Use Content Items when:
You have content that you want to manage in one place and reuse across many pages throughout the site. For example, ad banners for a sidebar.
You want to target content on various known attributes, such as if a customer is registered or if they have at least $50 in their cart. There is a sophisticated and extensible rules engine that allows you to target content exactly where you want it.
You want to A/B test that particular area on your page with various different possible assets.
Use Theme Configuration Variables when:
You need to control CSS variables such as fonts, colors, and sizes
You want to control JS variables that drive behavior in your application, such as using an AJAX modal cart versus a standalone page.
You're configuring some global aspect of the site, like a site logo.
Use Page Variables (Page Fields) when:
- The data you're wanting to control will ever only appear on that page. For example, your featured product page might have a lookup variable for the desired product and a rich text variable for the featured description.