Content Management
Installation | Content Manager | Content Display Functions | The Catalog
O3's content management system is optional because O3 is designed to work with existing websites, and generally not interfere with your way of doing things. The content management module gives you, or your customers:
- The ability to edit content online using a WYSIWYG editor or an HTML editor.
- A set of powerful content display functions for the front-end.
- Automatic integration into the catalog page. Have 'articles' in your category tree!
You can embed any O3 objects into your content pages using the macros described below. This is a powerful & easy way to build content pages containing products, items and schedules...
O3 uses the powerful, yet easy to use SPAW editor from Solmetra to provide the WYSIWYG editing capabilities.
Note that if you don't need a WYSIWYG Editor etc., you can build a hierarchy of web pages using the standard categories - just put the page content in the Full Description...
Important Note: The CMS module does not allow your websites users to add/update or delete content - administration of content items can only be done through the back-end Contant Manager page. If you want to allow user to add stuff to your website - you need the List Items module!
Installation
Installation is simple. Just unzip the distribution file either first into your development environment (as discussed in the O3 installation), or directly to your web-server, in the 'o3' directory.
This should create the structure: 'o3/spaw'
The next time you access your O3 installation - it will automatically detect it, and the content-management functionality becomes enabled. You get a number of settings (Default Editor, Catalog Headings etc), and the Content Manager icon appears in the O3 index page. (Note, the Content Manager icon is not displayed by default in the menu bar. You can switch it on in the Menu settings.)
Content Manager
This page allows you to create, update and delete content items using either the WYSIWYG or HTML editors. You can define which is the default editor in the settings.
Content items can be text or HTML up to 64Kb in length. They have a Title - which is used for the page title if they're shown on their own, and a category - so you can place them into a hierarchy.
Contents, like containers, can include some powerful macros which are replaced by real data dynamically. Using the macros you can basically link to, or include, most O3 things, anywhere in your webpages... Here's a list of the macros content items can contain:
| Macro | What it displays... |
| ROWCOLOR | When displaying lists, this alternates between the colors defined in the Search Settings. |
| CN-NAME | Content Name |
| CN-DESC | Content Description |
| CN-TITLE | Content Title |
| CN-CNTnumchars# | The content text / HTML. Note this must have a terminating '#'. numchars defines how much of the content to display in characters. If empty - it shows all. |
| CN-CREATED | Created date |
| CN-UPDATED | Updated date |
| CN-URL | URL to display the content item in the catalog |
| Macros returning a URL |
| CN-PRODUCT-NAME-URLproductname# | URL to display the specified product |
| CN-PRODUCTS-NAME-URLnamelike# | URL to display a list of products where the name is like... |
| CN-PRODUCTS-CATEGORY-URLcategorylike# | URL to display a list of products where the category is like... |
| CN-CATEGORIES-NAME-URLnamelike | URL to display a list of categories where the name is like... |
| CN-SUBCATEGORIES-URLparentcategory# | URL to display a list of child categories of the parent... |
| CN-CATEGORY-URLcategoryname# | URL to display the specified category |
| CN-CONTENT-NAME-URLcontentname# | URL to display the specified content |
| CN-CONTENTS-NAME-URLnamelike# | URL to display a list of matching contents where the name is like... |
| CN-CONTENTS-CATEGORY-URLcategorylike# | URL to display a list of matching contents where the category is like... |
| CN-ITEM-NAME-URLcontentname# | URL to display the specified item |
| CN-ITEMS-NAME-URLnamelike# | URL to display a list of matching items where the name is like... |
| CN-ITEMS-CATEGORY-URLcategorylike# | URL to display a list of matching items where the category is like... |
| CN-SCHEDULE-NAME-URLcontentname# | URL to display the specified schedule |
| CN-SCHEDULES-NAME-URLnamelike# | URL to display a list of matching schedules where the name is like... |
| CN-SCHEDULES-CATEGORY-URLcategorylike# | URL to display a list of matching schedules where the category is like... |
| Macros which include an object. |
| If you remove the '-URL' from the end of the above - you get these: |
| CN-PRODUCT-NAMEprname[|container]# | Display the specified product (in the optional container) |
| CN-PRODUCTS-NAMEnamelike[|container]# | Display a list of products where the name is like... |
| CN-PRODUCTS-CATEGORYcategorylike[|container]# | Display a list of products where the category is like... |
| CN-CATEGORIES-NAMEnamelike[|container]# | Display a list of categories where the name is like... |
| CN-SUBCATEGORIESparentcategory[|container]# | Display a list of child categories of the parent... |
| CN-CATEGORYcategoryname[|container]# | Display the specified category |
| CN-CONTENT-NAMEcontentname[|container]# | Display the specified content |
| CN-CONTENTS-NAMEnamelike[|container]# | Display a list of matching contents where the name is like... |
| CN-CONTENTS-CATEGORYcategorylike[|container]# | Display a list of matching contents where the category is like... |
| CN-ITEM-NAMEcontentname[|container]# | Display the specified item |
| CN-ITEMS-NAMEnamelike[|container]# | Display a list of matching items where the name is like... |
| CN-ITEMS-CATEGORYcategorylike[|container]# | Display a list of matching items where the category is like... |
| CN-SCHEDULE-NAMEcontentname[|container]# | Display the specified schedule |
| CN-SCHEDULES-NAMEnamelike[|container]# | Display a list of matching schedules where the name is like... |
| CN-SCHEDULES-CATEGORYcategorylike[|container]# | Display a list of matching schedules where the category is like... |
| CALENDARschedulename# | Display a calendar for the specified schedule... |
| O3VAR# | Any internal value from the item's data or type data (i.e. O3VARsize#)
|
| O3USR# | Any value from the current user's data or type data (i.e. O3USRus_email#)
|
| O3IFa|b|c|dO3ENDIF | A simple comparison operator. If a=b then c is output, else d. The contents can contain other macros as all others are parsed first. Note this macro has a different terminator to the others to allow you to embed them within an O3IF. |
You can always refer to the examples that come with O3 to see how to use these macros.
Content Display
Here's a list of O3's content display functions. These are available to use in your webpages wherever you like. You must include the o3start & o3stop files in pages which use these functions (as described in Installation.
You can use O3's functions to create all sorts of lists of contents in the same way as with products.
| Function | Description |
| show_contents (name, category, container, incols) | All parameters are optional. Show a list of content items where the name or category are like (it's a regular expression)those provided. It uses the container defined in the settings if none is supplied. |
| show_content (name, container) | container parameter is optional. Show a content item. It uses the container defined in the settings if none is supplied. |
The Catalog & Content
If the O3 CMS is installed, the catalog page will automatically display any content allocated to the current category (along with products & list items). You can use the site map and breadcrumb trail to traverse the category hierarchy.
Any content items not allocated to a category are automatically displayed in the 'Root' category page, under the heading of 'News' (defined in the settings).
OfficeTrio: The Integrated ECommerce Solution Products & Buy Buttons
|