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

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

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


Catalogue

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#105488 (In Topic #20571)
Avatar

Fan in training

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.

i.e 

Block construction assistant: main_cc_embed (change)


How do I show the catalogue categories as a list, instead of the list of items inside a single category that the assistant allows?

Thanks
Back to the top
 
Posted
Rating:
#105550
Avatar

Well-settled

Hi!

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.

Hope this helps, for what it's worth,

Richard.



Last edit: by RichT
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: