ocPortal Tutorial: Custom pages of information (via Comcode)
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:
Table of contents
The WYSIWYG editor may be used to edit Comcode pages, although it provides less control
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.
The easy way to add a Comcode page
The edited Comcode page looks like this
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.
An illustration to how blocks work
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)