{"id":1627,"date":"2025-04-22T09:17:05","date_gmt":"2025-04-22T13:17:05","guid":{"rendered":"https:\/\/sls.gmu.edu\/web\/?p=1627"},"modified":"2025-04-22T09:17:24","modified_gmt":"2025-04-22T13:17:24","slug":"how-to-create-a-cascade-format-in-velocity-for-content-area","status":"publish","type":"post","link":"https:\/\/sls.gmu.edu\/web\/2025\/04\/22\/how-to-create-a-cascade-format-in-velocity-for-content-area\/","title":{"rendered":"How to Create a Cascade Format in Velocity for Content Area"},"content":{"rendered":"<p>Add an editor <code>region<\/code> in the template template:<\/p>\n<pre><code>&lt;system-data-structure&gt;\r\n     &lt;editor&gt;This is my first page.&lt;\/editor&gt;\r\n&lt;\/system-data-structure&gt;<\/code><\/pre>\n<p>Create a <code>format<\/code> using Velocity:<\/p>\n<pre><code>#* this is a multiline comment in Cascade\r\n$currentPageSiteName\r\n$currentPagePath\r\n$currentPage\r\n$currentPage.assetId\r\n$currentPage.assetType\r\n$currentPage.label\r\n$currentPage.metadata.title*#\r\n## This is a single-line comment in Cascade\r\n$currentPage.getStructuredDataNode(\"editor\").textValue\r\n##$_PropertyTool.outputProperties($currentPage)<\/code><\/pre>\n<p>This is the transformation result:<\/p>\n<pre><code>This is my first page.<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Add an editor region in the template template: &lt;system-data-structure&gt; &lt;editor&gt;This is my first page.&lt;\/editor&gt; &lt;\/system-data-structure&gt; Create a format using Velocity: #* this is a multiline comment in Cascade $currentPageSiteName $currentPagePath $currentPage $currentPage.assetId $currentPage.assetType $currentPage.label $currentPage.metadata.title*# ## This is a single-line comment in Cascade $currentPage.getStructuredDataNode(&#8220;editor&#8221;).textValue ##$_PropertyTool.outputProperties($currentPage) This is the transformation result: This is my first page.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[11],"tags":[51],"class_list":["post-1627","post","type-post","status-publish","format-standard","hentry","category-web-development","tag-cascade"],"_links":{"self":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts\/1627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/comments?post=1627"}],"version-history":[{"count":0,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts\/1627\/revisions"}],"wp:attachment":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/media?parent=1627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/categories?post=1627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/tags?post=1627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}