Introduction | Setup | Settings | Parameters
This page brings all of O3's functionality together in one place. While you can show your products etc. in your pages using the show_...() functions, the catalog page does them all - and displays different things depending on the parameters passed into it.
This page resides in your website home directory because it makes it easier for you to add your own template below the code. If it was in the o3 directory, you'd have to change all the image urls & links in your template just for this page...
All the things the catalog can show are shown in their Containers.
If you include Create/Update/Delete/Approve forms in your containers, then the actions will be processed by O2 and the results will be shown immediately in the catalog page. This means your users can view & edit thier listings/content etc - all from the one place.
To get this page working you have to do the following things:
- Create your categories and products
- Copy your template into the bottom of the catalog page
catalog.php. It goes below the HTML header - which should be left intact as it dynamically creates the pages title and META tags for you (to ensure the best possible search engine rankings).
- Replace the content part of the template with the following code:
<? echo $scr_out; ?>
That's basically it. You can go further and create dynamic menus, and links to categories and products and content using the functions described elsewhere in this manual (see Functions)...
There are 3 main categories of settings the catalog page uses. They are defined in the settings under 'Catalog Page', 'Containers' and also under the optional modules' settings (i.e. you define the container for items under the Items settings):
- Containers. These define which container to use for which object.
- Titles. These define the page titles (Which appear in the browser's Title bar) when displaying different things
- Headings. These are displayed on the page above the content.
The catalog page will display different things depending on which parameters are passed into it. Many of the parameters will take a Regular Expression - which is a pattern matching language enabling you to match many different things at once...
All REs in O3 are case-insensitive - all text is converted to lowercase first!.
Examples of common regular expressions would be:
- 'item' - matches the text 'item', anywhere in the subject.
- 'it1|it2|it3' - matches either of the 3 the text strings 'it1', 'it2' and 'it3', anywhere in the subject.
- '^item1$' - matches the exact string 'item1' only.
You can read a good explanation of REs here: http://dinki.mine.nu/word/regex/regex.php
Here's a list of the parameters you can use:
|con||container name - same for all options below. This overrides the default containers.|
|stxt||Search for this text in website (static) pages|
|as||Use this 'Advanced Search' script. This must be a PHP script as described in the Types page. Searches for whatever you specify.|
|itm||Show a single product's details, or...|
|nam||Show products whose name matches this regular expression.|
|cat||Show products whose category matches this regular expression.|
|typ||Show products whose type matches this regular expression.|
|cre||Show products whose creator matches this regular expression.|
|pri||Show products whose price matches this specification. Examples: '>100', 'BETWEEN 1000 AND 9999'|
|rec||Show subscriptions if this = Y|
|citm||Show a single category's details, or...|
|cnam||Show categories whose name matches this regular expression.|
|ccat||Show categories whose parent matches this regular expression.|
|aitm||Show a single content item, or...|
|anam||Show contents whose name matches this regular expression.|
|acat||Show contents whose category matches this regular expression.|
|acre||Show contents whose creator matches this regular expression.|
|iitm||Show a single item's details, or...|
|inam||Show items whose name matches this regular expression.|
|icat||Show items whose category matches this regular expression.|
|ityp||Show items whose type matches this regular expression.|
|icre||Show items whose creator matches this regular expression.|
|sitm||Show a single schedule, or...|
|snam||Show schedules whose name matches this regular expression.|
|scat||Show contents whose category matches this regular expression.|
|styp||Show schedules whose name matches this regular expression.|
|scre||Show schedules whose creator matches this regular expression.|