Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 you code as the text block content.

Info

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.

...

Select the php output.

...

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

...

Info

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.

...

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

Info

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.

...

→ More: Code Sections on the Cascade CMS Knowledge Base

Enter your code in the Code data definition 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

Note

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

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