How do I make an XML sitemap?

An XML sitemap can help inform search engines about pages in your site that are available to crawl and the date they were last modified. We have an example SEO Sitemap   Velocity Format which can be applied to an Index Block configured to index your site. Here are the steps to create a...

How do I create a "calling page" Index Block?

This Index Block, which is usually referred to as a calling page or current page Index Block, is one of the most used Blocks in Cascade CMS. Creating an Index Block Select Add Content > Block > Index. Choose a system name (e.g. "calling-page"). For the Index Type field choose "Folder...

Output content as JSON

With a combination of Template, Format, and Output, you can publish your page content as a JSON file. Template Create a Template using skip tags and a "dummy" surrounding element: <!--#cascade-skip--><pass-through><system-region...

How do I create an XML output for a page?

To create an XML Output for a page: Create a new Template with only the following content: <system-region name="DEFAULT"/> Navigate to Manage Site > Configuration. Select your existing Configuration and edit it. Click Add new Output. For the Name field, enter "XML". For the Template...

How do I view sample XML when editing a Format?

Often times, when coding (or debugging) a Format, it is important to be able to view sample XML that may be applied to a Format. Or, if you are working with a Velocity Format, you may need to specify a context page in order to test the built in $currentPage and $currentPageSiteName variables. To...

Testing for an empty WYSIWYG field

Testing to see if a WYSIWYG field can be tricky since the field could either contain plain text or HTML elements. One solution is to test if the value of an XML Element is not empty, or if the Element contains children (ie the HTML elements). Using Velocity With the Cascade API ## Record the...

How do I access Dynamic / Custom Metadata Fields in Velocity?

With the XPath Tool If you're using an Index Block and the XPath Tool, you can target the name of your Custom Metadata Field in your XPath Syntax. Example: #set ($category = $_XPathTool.selectSingleNode($contentRoot, "//calling-page/system-page/dynamic-metadata[name='category']/value"))#if...

How do I sort on a Calendar field?

The format of a Calendar field value (distinct from a Date/Time field) is MM-dd-yyyy which can make it tricky to sort on without some additional work to convert it to a numerical timestamp. Here are some examples of using a lookup table to sort pages on a Calendar field: With the XPathTool #set...

How can I set up canonical tags?

This article provides a couple of sample methods for configuring canonical tags in your Site(s). These are examples only and may require additional development/configuration depending on your organization's needs.

How do I access a chooser field's chosen asset?

Cascade API When working with the Cascade API and choosers, there is an asset property which will be set to the chosen asset's API Object if an asset is chosen, or null if no asset is chosen. Because the asset property will be null if no asset is chosen , it is advised to ensure an asset is...

How do I add code snippet such as Google Tag Manager?

Google Tag Manager snippets generally consists of the following code snippet: <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var...

How do I include a page's ID in its contents?

Each asset in Cascade CMS has an unique ID, visible in the URL when viewing the asset in the interface. Including a page's ID in the published page source can be useful for things like deep linking to Cascade CMS from Siteimprove, DubBot, or other third-party reporting platforms. You can include...

How do I include Open Graph or Twitter card meta tags in my page?

Open Graph meta tags and Twitter Card meta tags allow you to control what your pages look like when shared on social media sites such as Facebook and Twitter. To add these tags to your published pages, create a new system region within the <head> tags of your Template(s). For...

How do I add a <title> tag to my page?

To add a title metadata tag and other metadata tags directly to your Template(s) Navigate to your Template and click Edit. Place the <system-page-title/> tag inside the <title> tags of your Templates and click Submit. When the page is rendered, Cascade pulls in the Title as defined...

How do I apply CSS?

You can apply CSS at the Template, Configuration, or Page level by linking to it in an XML Block. Create a Region in your Template: Navigate to your Template and click Edit. Create a new Region within the <head> tags of your Template by adding a System Region tag. Example:...

How do I make CSS classes available in the WYSIWYG formats drop-down menu?

To allow users to apply styles to their content within the WYSIWYG editor: 1a. At the Site Level: Click Manage Site > WYSIWYG Editor Configurations. Select your configuration or click Create to add one. In the CSS File field click Choose File and select the CSS file containing the classes you...

Why aren't my CSS background images being displayed?

CSS background images require special tags that let the system know you are referring to an image that is managed by Cascade CMS. Consider the following lines in a CSS file: .content{ background-image: url('/images/photo.png'); } To link to this image from the CSS file within Cascade, the...

Why am I seeing <system-region> tags around my published content?

System region tags are automatically added to rendered and published content that doesn't contain valid XML. Specifically, due to a lack of a root element when Cascade CMS attempts to validate the content as XML during the rendering and publishing process. To generate non-XML compliant content,...

How can I redesign a site using our existing content?

The following setup allows you to develop a new site design, using current site content, alongside your current design: Edit your site's Configurations and add a new Output. This Output will use your new Templates, Blocks, and/or Formats. Edit your site's Content Types and configure the Publish...

How to update deprecated Velocity code

$_FieldTool.in("com.hannonhill.cascade.model.dom.identifier.EntityTypes") The $_FieldTool.in(String) method was used to obtain reference to entity types in order to locate assets using the Locator Tool. New methods added to the Locator Tool allow for locating each type of...

Working with namespaces in Velocity

Consider the sample snippet below: <info xmlns:d="https://www.hannonhill.com"> <d:Title>Hannon Hill - Cascade CMS</d:Title> </info> In order to access the <d:Title> element here using a Velocity Format, the following methods can be used: Method 1: #set ($dNs =...