What are shared CleanSlate Partials?
Shared CleanSlate partials are centralized blocks of code that CleanSlate themes can use to provide common functionality and consistent branding across WVU web pages. They correspond to our WVU Design System components. Prof. Techs. can include these partials in their theme code, or assign them to a page slot using the Super Template. Configuration options for shared partials can be found at the bottom of each documentation page for our components.
Should I use shared CleanSlate partials?
It depends. Some developers prefer to build their partials from scratch i.e. copy and paste the HTML for a component into a theme partial, tweak the markup as-needed, and insert their own Liquid code. This ensures the partial will behave exactly as the developer wants. Custom partials tend to require less logic, are less complex, and while we’ve made efforts to make shared partials as performant as possible, custom partials perform better. However, we recognize the need to provide out-of-the-box solutions to our clients and other Prof. Techs. at WVU. The following are reasons to use shared CleanSlate partials:
- They do what you want them to. Shared partials perform specific functions. As a rule of thumb, if it’s not documented, don’t assume a shared partial does more than it appears. If this functionality doesn’t meet your needs, and therefore requires significant alterations, it’s often better to create a custom partial.
- You lack the time to build a custom theme. Often clients need to get a site up on a tight deadline. It’s often not feasible to develop a custom theme in this timeframe. Using shared partials allow you to get a site up and running quickly, not only because they can be easily added to a site’s theme, but also expedite the website approval process. All websites must be approved by University Relations prior to launch; therefore custom sites may require multiple design iterations before we approve them.
- You lack the technical know-how to build custom themes. We encourage WVU Prof. Techs. to learn how to build custom themes. See our CleanSlate Theme Development Video Tutorial Series for more info. However, we recognize that not all Prof. Techs. have the same level of expertise to build custom themes. Using shared partials can allow Prof. Techs. to skip this step.