HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

ocPortal Tutorial: Custom pages of information (via Comcode)

Written by Chris Graham, ocProducts


If you are using short URLs, then '<base-url>/<zone>/pg/<page-name>' will also access the page.
You may easily add new pages of information to ocPortal by making a 'Comcode page'.
A Comcode page is a page written in Comcode, and thus is almost written in plain text. Like any page in ocPortal, a Comcode page is accessed by using:

Making pages

Thumbnail: The WYSIWYG editor may be used to edit Comcode pages, although it provides less control

The WYSIWYG editor may be used to edit Comcode pages, although it provides less control

Thumbnail: Editing a Comcode page

Editing a Comcode page

There are three supported ways to add a new Comcode page in ocPortal:
  • Go to the 'Structure' section of the Admin Zone and choose the 'Add-New-Page Wizard' icon. The wizard is the most user-friendly method and will actually automatically add a link to your page onto one of your menus if you wish.
  • Go to the Content Management Zone, choose the 'Comcode pages' icon, and give a new page name in the '<zone>:<page-name>' format ocPortal uses in the list of pages that already exist (where a page in the Welcome Zone would just be ':<page-name>').
  • Just to type in the URL to where you want the page to be, and click the given link to add the missing page.

Thumbnail: The easy way to add a Comcode page

The easy way to add a Comcode page

Thumbnail: The edited Comcode page looks like this

The edited Comcode page looks like this

Once the Comcode page editor is open, you can pretty much just type your page in plain-text, with small diversions to indicate special formatting (most notably, the 'title' tag, which every page should include). It is beyond the scope of this tutorial to explain Comcode: see the Comcode tutorial for this.


Important note

[block=parameter]<block-name>[/block] is a shorthand for [block param=parameter]<block-name>[/block].
More advanced pages, such as the default start page in the Welcome Zone, and the panels, make use of 'blocks'. Blocks are dynamic elements, tied into Comcode pages via the Comcode 'block' tag.
By 'dynamic element', I mean an element that automatically generates content that could not be prepared, such as a list of recent topics on a forum, or information about the currently logged in user.
The actual block to use, is just the contents within the [block] tag, and the parameters to the block are just the parameters given to the [block] tag.
Thumbnail: An illustration to how blocks work

An illustration to how blocks work

At the time of writing, ocPortal contains 67 blocks to choose from.
Blocks can be classified into:
  • Main blocks (blocks inserted into the internal body of the site)
  • Side blocks (blocks shown on the side of the site, in panel_left or panel_right)
  • Bottom blocks (blocks intended for the site footer)


Comcode page
An ocPortal page written in Comcode, editable from inside ocPortal
A dynamic element designed to be inserted into a Comcode page via the [block] tag

See also