Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

You can directly insert code (html, PHP) in your pages in a couple ways…

Including code at the page configuration level

Step 1: Create your code block

In this case, you’ll use a basic text block for your code. In the Add Content menu, select Block > Basic > Text Block.

add text block menu item

Add you code as the text block content.

Be sure to wrap your code in the correct code section tags!

→ More: Code Sections on the Cascade CMS Knowledge Base

Step 2: Add your code to the page configuration

Edit the desired page.

Select the Configure tab.

configure tab

Select the php output.

php output

In the CODE region, use the asset selector to select your code block.

choose block for the code region

You can leave the format selector empty

Including code within the page content

Step 1: Create your code block

In this scenario, you’ll need to create a Code block, which is different than adding code to a basic text block. In the Add Content menu, select Block > Code.

add code block menu item

Use the Cascade wrapper tag field to auto-wrap your code in the desired passthrough or protect tag.

Select None if you want to divide the code up into different types of wrapper tags. In this case you’ll need to manually add the wrapper tags in the code yourself.

cascade wrapper tag data definition field

→ More: Code Sections on the Cascade CMS Knowledge Base

Enter your code in the Code data definition field.

code data defition field

Step 2: Add the code block to the page content

You can add the code block anywhere you’d add a layout or widget.

→ More: Working with pages

→ More: Layout builder pattern

SUPER IMPORTANT - DON’T MESS WITH THE $_scpa GLOBAL ARRAY

The templates use a PHP array named $_scpa to perform its server-side functions. You break, you buy.

  • No labels