Cascade Velocity Locator Tool

Est. Reading Time: 2 minute

The Cascade Velocity Locator Tool allows the Cascade page to render faster internally in the CMS system. It supports up to 500 query items on a page. For example, if you have a large list of data that needs to display on a listing page such as news articles, the Cascade Velocity Locator Tool is a great for rendering that data.

Please note, this is just within Cascade to help processing the page while loading information in the preview pane. This does not affect the actual page while in a live web browser.

The Velocity Locator Tool is very robust and this example is a simple setup for demonstration purposes to show the Locator tool and set values of different types. This assumes that you’ve already created the content type to pull from using the Locator Tool.

Example of setting the Locator Tool and initializing variables:

## Use the Locator Tool to find requested pages

#set ( $query = $_.query() )

#set ( $query = $query.byContentType(“site://***SITE NAME HERE***/Desired Page”) )

## Set the query tool to search by content type.

#set ( $query = $query.includePages(true) )

#set ( $query = $query.maxResults(500) )

#set ( $query = $query.siteName(“***SITE NAME HERE***”) )

#set ( $query = $query.sortBy(“created”) )

#set ( $query = $query.sortDirection(“desc”) )

#set ( $newsArticles = $query.execute() )

## Initialize variables

#set ( $newsDate = “” ) #set ( $title = “” ) #set ( $summary = “” ) #set ( $newsLink = “” ) #set ( $imageSrc = “” ) #set ( $imageAltText = “” )

## Set variables

#set ( $newsDate = $_EscapeTool.xml($newsArticle.getStructuredDataNode(“page-content/news-info/release-date”).textValue) )

#set ( $title = $_EscapeTool.xml($newsArticle.metadata.Title) )

#set ( $summary = $_EscapeTool.xml($newsArticle.getStructuredDataNode(“page-content/news-info/summary”).textValue) )

#set ( $newsLink = $newsArticle.link )

#set ( $imageSrc = $newsArticle.getStructuredDataNode(“page-content/news-info/image”).asset.link )

#set ( $imageAltText = $_EscapeTool.xml($newsArticle.getStructuredDataNode(“page-content/news-info/image-alt-text”).textValue) )

Source: Hannon Hill

About the Author:

Zedric Myers
Zedric Myers is a Web Designer for Beacon Technologies. After earning his degree in Advertising and Graphic Design, he spent 11 years with an advertising agency in Greensboro, NC where he was initially hired as a designer and transitioned to being a Web Developer.