While many features in Cascade CMS cater to content contributors and marketers, this hidden gem is mainly for developers who build and maintain the structure and logic behind content.
Cascade’s support for Velocity macros and reusable formats offers a powerful way to write cleaner, more modular, and performance-optimized code. Whether building templates, rendering dynamic blocks, or formatting XML content, these tools can make your codebase significantly more manageable.
In Cascade CMS, Formats are script files, typically written in Apache Velocity, that transform XML data into markup (HTML, XML, JSON, etc.). Macros serve as reusable code blocks within these formats that encapsulate common logic.
You can organize macros into shared formats and import them wherever needed, promoting DRY (Don't Repeat Yourself) principles and increasing site consistency.
Velocity macros and reusable formats bring:
These best practices lead to a cleaner codebase, faster page loads, and fewer bugs across your implementation.
Based on Hannon Hill’s Velocity Best Practices Guide, here are a few top recommendations:
Each #import directive creates a database call. Instead of importing several separate macros like this:
velocity
CopyEdit
#import ("_shared/macros/stripTags")
#import ("_shared/macros/escapeAll")
#import ("_shared/macros/makeAccessible")
Bundle related macros into a single utility format:
velocity
CopyEdit
#import ("_shared/macros/utility")
This improves performance and keeps your imports clean.
Name your macros descriptively (e.g., #formatDate, #renderNav, #generateBreadcrumbs) so others can easily understand what they do. It also helps when scanning large shared macro libraries.
Cascade comes with Velocity Tools like:
Use them to keep your macros efficient and readable.
Use Cascade’s “Test Format” feature to validate your macros against actual content before integrating them into templates. It’s an easy way to catch bugs before they affect the site.
Here’s a quick guide to creating reusable Velocity macros:
Bookmark the Velocity Cheat Sheet (PDF) to keep syntax handy.
If you’re a developer working in Cascade CMS, Velocity macros and reusable Formats are among the most powerful tools in your toolkit. They promote smart coding, better site performance, and a smoother handoff between front-end structure and content.
As your implementation grows, these techniques will pay dividends in maintainability and speed. Think of them as your framework that is custom-built for your Cascade-powered site.
To learn more about how Cascade CMS and Clive Web Personalization can help your institution reach more students than ever before, reach out to our team.
Last Updated: Aug 27, 2025 10:00 AM