I searched but didn't really see anything relating to this. I would like to use categories (ala News) across the whole site.
I think the news Category table (module_news_categories) would work great but just make it a core piece that any module could hook into (i.e. just call the table categories instead).
Another helpful thing would be to have the different modules or core components be able to assign more than one category. This would probably require a separate mapping table though.
Site-wide Categories
Re: Site-wide Categories
I was thinking more about the issue with mapping an object (i.e. module, htmlblob, page, file, image, tag, etc) to multiple categories and realized that each object would need to have its own table to store the mapping to the category since a sequence is only guaranteed to be unique within its own set of tables. Another way would be to have a single mapped table with an extra column that would register the object name/type as well as the object's sequence number and category.
One way I could see to simplify this would be to have all objects use a single sequence table. Then you could just store the object sequence and the mapped category for all objects across the site. The current data type would allow for over a billion sequence numbers so I can't see that being an issue.
Is there any reason that each new object that gets added to the site needs to have its own sequence table? We are really just needing a way to ensure uniqueness, right?
One way I could see to simplify this would be to have all objects use a single sequence table. Then you could just store the object sequence and the mapped category for all objects across the site. The current data type would allow for over a billion sequence numbers so I can't see that being an issue.
Is there any reason that each new object that gets added to the site needs to have its own sequence table? We are really just needing a way to ensure uniqueness, right?
Re: Site-wide Categories
BTW, I thought I would point out that this isn't just idle talk. I would be more than willing to jump in an make any necessary changes to help this get done. I just don't want to waste my time forking the code and then having to shoehorn any future features back into the system.
Re: Site-wide Categories
Technically, it's definitely possible. I'm just not quite sure where the usefulness comes out in using categories for regular content stuff. Is it a front end thing? Or more for something in the admin?
Re: Site-wide Categories
Front End.wishy wrote: Technically, it's definitely possible. I'm just not quite sure where the usefulness comes out in using categories for regular content stuff. Is it a front end thing? Or more for something in the admin?
Examples:
- Automatically add content to pages by pulling in all Global Content Blocks that match certain categories.
- Create photo albums of images marked by category. See this thread:
http://forum.cmsmadesimple.org/index.ph ... 1.new.html - Add a resource (i.e. link, file) to a page automatically without having to go through the whole site to see where it might be applicable.
Also, if another module needs to create categories like the News module, then they would need to have a whole separate and probably duplicate list of categories. Whereas if the categories were more closely tied to the core of the CMS, then anyone could use it.
It just seems like a simple yet powerful foundational piece that other functionality could build upon.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Site-wide Categories
Yes, the news, banners, and uploads modules already have the concept of categories. and the category lists are maintained separately.
Yeah, maybe a global categories thing would be good too (could be done as a module), that other modules tie into to get category lists, etc.
though I don't necessarily agree with the categories thing for global content blocks, and for banners it may mess things up a bit, but in general, I do agree that having a central place to manage "categories" would be a good idea.
Yeah, maybe a global categories thing would be good too (could be done as a module), that other modules tie into to get category lists, etc.
though I don't necessarily agree with the categories thing for global content blocks, and for banners it may mess things up a bit, but in general, I do agree that having a central place to manage "categories" would be a good idea.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Site-wide Categories
Ok, now it makes sense to me. A little slow on a Friday... 
Yeah, this could be an interesting idea. A little categories module, or even something more integrated into the core. Actually... the system modules idea I have would be perfect for this. I might have to look into that for after 0.12.

Yeah, this could be an interesting idea. A little categories module, or even something more integrated into the core. Actually... the system modules idea I have would be perfect for this. I might have to look into that for after 0.12.