How to list content as category?

General project discussion. NOT for help questions.
Post Reply
nchankov
New Member
New Member
Posts: 8
Joined: Wed Feb 11, 2009 11:21 am

How to list content as category?

Post by nchankov »

hi guys,

I am searching to a way to display some content of the site as category. For example I have the following structure:

Home | About | Products | Services | Contacts

So content pages Products and Services has sub nodes i.e. 5-6 under each of them and I want to display them as list in the root page.

I've tried Cataloger module but unfortunately it's not working in 1.9.X.X. I believe that it's a very common question and probably there is trivial and easy solution, so I don't want "to reinvent the wheel".

I would appreciate if anybody give me some hints about this.

Cheers
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: How to list content as category?

Post by spcherub »

@nchankov: Your question is either incomplete or confusing. If you describe your actual situation in additional detail you may may receive more responses and advice.

For instance, are you trying to display links to sub-pages in your top-level pages?

If so, this functionality is more than amply covered using the included MenuManager. You can also use the CGSimpleSmarty to build your own menu listing but I don't see why you need it when MenuManager is good enough.

If your products and services can be setup as individual pages then use the following method:

#1 Setup your page hierarchy as follows:
1. Home
2. About
3. Products
3.1 Product #1 Detail Page
3.2 Product #2 Detail Page
3.3 Product #3 Detail Page
4. Services
4.1 Service #1 Detail Page
4.2 Service #2 Detail Page
4.3 Service #3 Detail Page
4.4 Service #4 Detail Page
5. Contacts

#2 Add as many sub-pages for Products and Services you need.

#3 Within the template (assuming you are using the same one for all top-level pages), add the following code -

Code: Select all

{menu childrenof=$page_alias}
and specify the menu template you want to use if other than the default. Style the resulting list and you are done.

If your products and services need to be modeled differently, you can one of the following methods:
#1 Use the News module
- Setup your products and services as News articles
- Use the category field to setup two categories "Service" & "Products"
- Assign the proper category to the articles you create to represent the products and services
- In the page instance for the Products page, you can use the following code to display only Products:

Code: Select all

{news category="Product"}
and on the Services pages you can use:

Code: Select all

{news category="Service"}
Of course, you can specify the template to use if other than the default.

# You can always use the Products module which being derived from (inspired by) the News module can be set up very similar to what is described for the News module above.

Hope these tips help in some way to guide you to your desired solution.

-S
nchankov
New Member
New Member
Posts: 8
Joined: Wed Feb 11, 2009 11:21 am

Re: How to list content as category?

Post by nchankov »

@spcherub,

thanks for your detailed answer.

Of course I know about menu (it's in the demo of the shop) as well as about the news. But I think that similar functionality is really "nice to have" in that brilliant CMS. What I am looking is something similar to Cataloger module, but unfortunately it's not working with the new version of CMSMS and as far I can see the support is zero.

Anyway, I will try few things and if not possible I will use the menu tag.

Edit: Thinking further, I believe that I can sort my issue with {menu} tag now.

Thanks for the advises.
Post Reply

Return to “General Discussion”