Versions Compared

Key

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

You can include custom PHP code 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.

...

Info

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

→ More: Code Sections on the Hannon Hill Knowledge Base

Step 2: Add your code to the page configuration

Edit the desired page.

Select the Configure tab.

...

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 you code in the desired passthrough or protect tag. If you select None, you will need to manually add the wrapper tags in your code. This may be desireable

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 Hannon Hill 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.

...