By continuing to use this site, you agree to the storing of first- and third-party cookies on your device to enhance site navigation; analyze site, product, and service usage; and assist in our marketing and promotional efforts. Cookie Policy

 
Skip to Content

Server-Side Code in Melody™

You can use server-side code in Melody to publish directly to your production server. Melody supports all server-side languages, including PHP, ASP, CFM, and JSP.

Add server-side code to both global and editable tiles. When used in an editable tile, the server-side code itself is not editable on the page (Layout Control File [LCF]) but can be deleted from the page.

  1. When you create or edit a tile, in the Source editor, click Insert Server-Side Code.
  2. Enter code.
  3. Select the preview type.
    • Image: Use the file chooser to select an Omni CMS file controlled by dependency manager or paste an external URL.
      • Inserts a full-width image.
    • File: Use the file chooser to select an Omni CMS file controlled by dependency manager or paste an external URL.
  4. Click Save.

Your code appears as an editable pill in the HTML source editor. To see how the tile will look when published, go to the page actions toolbar, click Preview. Server-side code tiles will also preview in layouts and LCF pages.

Then, add your tile to layouts to create LCF pages. If you have edited and re-launched a tile, update the layout(s) that use the tile. Edits will appear automatically in pages on the staging server that use the tile.

Add an include fileLink to this section

Use server-side code in a global tile to add and preview your include files, like headers, footers, and navigation. For example,

  1. In the Source editor, click Insert Server-Side Code.
  2. Select the preview type File.
  3. From the file chooser, locate a page named _sidenav.inc or similar.
  4. Click Insert.
  5. In the Source editor, add PHP to call the include file.
    server-side code tile for a side navigation include file
  6. Click Save.