Catalogue

Login / Search

Catalogue list on front page

Hi,

I can edit my front page and add a dynamic block from the list. The information I would like to add is the catalogue categories. However the selection only allows me to select one of the catalogue categories.

Each catalogue has an index page as its top level (or entry-point) page, listing all its categories. You could insert an "include" Comcode tag (one of the pre-installed set accessed via the Comcode Tag Assistant) into your front page to display the index page exactly as-is.

The catalogue index page displays, together with each listed category, any Comcode (text, images, etc.) you might have entered into that category's Description field. Also, categories are displayed in alphabetical order, and not in a way that corresponds to how they are hierarchically organized within the catalogue. These attributes can't easily be removed or changed - though you could enclose the category Description in each case within a Tempcode directive that excluded displaying it to un-logged-in viewers of your front page (i.e. members of the Guest usergroup). The directive would be typed in two parts: the first part (on the very first line of the Description) {+START,IF,{$NOT,{$IS_GUEST}}} and the second part (immediately after the end of the Description text) {+END}

As for displaying the categories hierarchically (i.e. as a tree), that would be more complicated. I haven't ever tried the following myself, but in principle, if the catalogue is set up with the "is tree" option ticked,
it might be possible to edit the catalogue default template so as to include a CSS class called "splurgh", which uses a JavaScript script to generate a tree-structured display. Regretfully I can't offer any instructions as to how to enter this into the template, and I would certainly not recommend experimenting without a fair knowledge of how ocPortal templates work and are structured.

All in all, however, you might find the above more trouble than it's worth. It might prove quicker and easier to get exactly the result you want just by manually entering the structured categories into your front page's Comcode, line by line - as simple body text or as hyperlinks - and re-edit this as categories got added or removed. Alternatively, you could create a Comcode page just containing that portion and insert this into your front page using the aforementioned "include" tag.