The long-awaited category module has finally been released! You can read all about the project's cool features, and its current status (and download it for CVS/4.7), at this page:

http://drupal.org/node/39683

The original category module proposal explains a lot of the concepts and motivations behind this project, as well as a huge number of comments that users have left over the past few months:

http://drupal.org/node/23730

Please do not post further comments to this page, but instead post them here or in a new forum topic. The module is still under heavy development, and there is still heaps left to do before it's ready to be called a 'stable release'. But the core functionality is almost all developed, and is already relatively stable and bug-free.

Further updates regarding development progress will be posted as comments on this page, from time to time. Anyone wishing to get involved in helping develop the category module (I know many people have indicated that they want to help over the past few months), please check out the list of todo items on the project page, and contact me if you're interested in working on any of them.

Jeremy Epstein - GreenAsh

Comments

venkat-rk’s picture

The distant parent component can be configured to allow any entity within your category structure to have any number of parents, of any type, anywhere else within the structure.

Sounds stunning. Thanks, Jaza. I have waited for something like this in Drupal for one year. Today is a good day;-)

Jaza’s picture

Now will you leave me in peace, Ram? ;-)

Haha.. I'm sure that few people will use this module as eagerly as you! Hope it helps you with all your future Drupal needs.

Jeremy Epstein - GreenAsh

venkat-rk’s picture

Now will you leave me in peace, Ram? ;-)

Not so sure about that! Might bug you for more;-)

But, you are right that I will lap it up eagerly.

egfrith’s picture

[Drat: I've added this in the wronge place in the thread; sorry about this.]

I'm liking the look of this module, though it's taking a while to get working properly.

First I had the problem of items reverting to root, but fixed that by allowing multiple levels of hierarchy in the contatainer (see bug http://drupal.org/node/43160).

Then I was puzzled as to why category links in nodes didn't appear; however, changing

  $terms = array();
  if (module_exist('taxonomy')) {
    $terms = taxonomy_link("taxonomy terms", $node);
  } 
  $links = array_merge($submitted, $terms);

to

  $terms = array();
  if (module_exist('taxonomy')) {
    $terms = taxonomy_link("taxonomy terms", $node);
  }
  $categories = array();
  if (module_exist('category')) {
    $categories =  category_link('categories', $node);
  }
  $links = array_merge($submitted, $terms, $categories);

in my chameleon-based php theme fixed this problem.

To get to the point, the problem I haven't bee able to fix is how to get breadcrumbs appearing on a node page (i.e. displaying a node of class story, page &c, as opposed to a category page). Is there some code I need to add to my theme, or has this not been implemented yet? Any help gratefully received.

mgifford’s picture

Updated the CVS this morning, but ran into a similar problem with this module from sometime yesterday. I think that the Menu Settings weren't being stored in some pages.

We had to go into the advanced edit settings and change it from Navigation to the parent we wanted.

Without the parent the breadcrumbs & menus were not appearing correctly.

I'll submit this as a bug too.
--
Mike Gifford, OpenConcept Consulting
Free Software for Social Change -> http://www.openconcept.ca

egfrith’s picture

I've put some more details about this issue at the bug you created
(http://drupal.org/node/44960).

egfrith’s picture

Just realised the above modifications to theme files aren't necessary if you enable the taxonomy compatibility by replacing the stock taxonomy.module with the one that comes with taxonomy.

venkat-rk’s picture

Interesting. What is the module that comes with taxonomy that needs to replace the stock taxonomy module?

Jaza’s picture

Can now be found at: /wrappers/taxonomy.module.copyme, in the category package. The installation instructions now tell you how to install this, as well as telling you when you should and shouldn't (currently) install it.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

egfrith’s picture

with the one that comes with taxonomycategory.

Sorry about the confusion -- and thanks for clearing it up Jaza.

syscrusher’s picture

I browsed the PDF docs and the code listings (but haven't installed it in my testbed yet). Looks like a superb design, and something that will be very helpful to people like myself building non-blog sites in Drupal. I'm looking forward to experimenting with your code soon.

Scott ("Syscrusher")

marknewlyn’s picture

where are the pdf files to read on the module?

marknewlyn’s picture

Sorry

PG-1’s picture

What is needed to run this module on the Drupal v4.6(3)?

Jaza’s picture

The module has been developed for the upcoming 4.7 release, which has significant differences with the 4.6 branch of Drupal. Therefore, the module is currently not able to run on Drupal v4.6.x. But once the module has been developed further and reaches a stable level, it will be backported to 4.6 (i.e. a 4.6 version will be made).

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

lekei’s picture

Great work Jeremy!

Looking forward to trying it when it is available for 4.6.

Guessing that the 4.7 jump will be way too much work to attempt to migrate for a very, very long time so I'm hoping to try it on 4.6.

Tagging this thread so I can watch for it's release.

Keep up the good work!

-Don

coupet’s picture

Looking for 4.6 if and when available.

Apache is bandwidth limited, PHP is CPU limited, and MySQL is memory limited.

merlinofchaos’s picture

Can I get you to look at the Views module? I see that much of your future plans include how to actually display category information.

I think the Views module's API may be valuable to you for some of these features.

-- Merlin

[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

Jaza’s picture

I have heard tidings of this so-called "Views" module of yours, and it is pleasing to my ear. :-)

The category_display module is going to be handling the display of "category-specific" page elements, such as a TOC, 'up-prev-back' links, etc. - but for the display of an actual node listing on a category page, I would love for the category module to be able to 'hook in' to the views API, so that these could be displayed differently on, say, a per-container basis.

However, this will have to wait until the views module is more developed and mature... not that the category module is fully developed or mature yet, either. ;-)

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

merlinofchaos’s picture

The views module is actually quite close, now. I'm almost done with the first round featureset (really! Just one more feature) and then it's cleanup, and then I start in on writing hooks for various modules and seeing if there's any features those modules need that I've missed.

-- Merlin

[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

simon rawson’s picture

The category module is totally new to me tonight and it looks great. I've read your pdf documentation, original proposal and tried to find out as much as I can about it. I've installed it on a testbed and had a play around with it.

I have probably missed something crucial, so please don't be offended by my questions...

Why do you need to have two different entities: containers and categories? Couldn't you just jave one entity, say categories, and have categories within categories etc.? What does having containers allow you to achieve?

Jaza’s picture

There are a number of important reasons why two distinct entities are needed:

  • Allows a set of categories to easily be treated as a "vocabulary", in the taxonomy sense
  • (on a related note) allows backward-compatibility with the taxonomy module
  • Allows categories to be organised into individual hierarchies of pages, book-style
  • Allows settings to be configured for a particular group of categories, which is a compromise between the two extremes of completely global settings (totally impractical), and per-category settings (tedious and time-consuming, and hence bad for usability)
  • Allows the root node in a given category hierarchy to be treated specially (e.g. special menu settings, special display settings), which is important as many people wish to use it as a 'master page' or 'index page'

Those are the main reasons, as far as I can think. However, it would be really cool if there was only one node type, and it was 'category', and then everything would be nice and simple. Unfortunately, I can't see that approach working in practice.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

tema’s picture

...please find a moment to write it in a docs. I think it could just be a list of differences between the container and category node types. Thank You for the great job!

[update]
http://category.greenash.net.au/glossary/38#letterc
perfect! thanx!

Ken Collins’s picture

I am very excited about this new module AND I am lucky enought to be in the tail end of developing the templete for my site, so it's very likely by the time I have content going into it, I will be able to use category.module and Drupal 4.7. That said, I really have a simple question.

Is all this necessary? I followed all of your HOW-TOs for setting up breadcrumbs and now I feel I am 99% there on my site, The ONLY thing I need now is the breadcrumb linking to /taxonomy/term/all instead of it's default. Is there some simple elegant hack that would change the "default" behavior of taxonomy.module to do this? Like one place where 0 is really all? That would make me happy :)

Either way, BLESS YOU for taking this on and doing the work. I think it'll mean TONS for the community.

Ken Collins’s picture

I knew it was there somewhere. In taxonomy.module, about 80% down in the function taxonomy_select_nodes() there is a line like this:

$tree = taxonomy_get_tree($term->vid, $tid, -1, $depth);

Change it to this:

$tree = taxonomy_get_tree($term->vid, $tid, -1, NULL);

It sets the depth to NULL which is the same as all. This gives me perfectly working categories in my drupal blog with working breadcrumbs in 4.6.x, it's the last step in all your tutorials.

Hope this helps everyone that cannot update to 4.7 right away.

PG-1’s picture

This patch will work even for RSS links at the bottom of term pages?

PG-1’s picture

http://drupal.org/node/39860

As for the problem of a category's parent not being choosable on the 'add category' page, there is currently no way that I can see to fix this, as some categories are not allowed to have parents, depending on the settings for their container. The category's parent(s) can always be chosen on the 'edit category' page, as the container has already been saved and defined for the category by then. For this reason, I recommend making use of the 'add child category' links on a container page.

Suggestion: "add category" link must follow to the container list page.

Jaza’s picture

I agree that a two-step process (first select the container, then go to the node add/edit form) would be ideal. However, implementing this with the 4.7 code base is a bit of a hack, as the 4.7 forms API doesn't really cater for multi-page forms.

I understand that "phase 2" of the forms API (as I've heard Adrian call it), scheduled for Drupal 4.8, will allow forms such as the node form to be split into multiple pages really easily. So I'm inclined to leave the slight usability problem there for now, and to fix it up when the Drupal form system is better able to support it in the future.

Alternatively, the 'select container' list could have some cool AJAX magic that dynamically links it to the 'parent' list... ;-)

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

PG-1’s picture

Question:

With upload module we get ability to add file in node add/edit form. After pressing "Attach" we see form reload with saving entered content and adding some new elements at the end of form. Why can't you do anything same?

PG-1’s picture

What about stable menu generation? Current work of category_menu is a real silent horror. :) It work as it want.

Jaza’s picture

Getting category_menu stable is hardly an easy task. Have you looked at the 'category_menu logic plan' PDF documentation? Coding all those complex sets of rules, and getting them to all play nice with each other, is a nightmare in itself. Please be patient.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

kiev1.org’s picture

Make please at addition of a content a convenient choice of categories through collapsed layers and checkbox it will be convenient at a plenty of categories

FlowDesign’s picture

First of all, I'd like to say that I'm really grateful to you guys who are developing this new module.

But I also have a question:
Will this new module also implement setting access rights for the menu-items (or categories) ?
It would be very useful when a user has no access to a 'category' it won't be displayed in the menu.

Jaza’s picture

An official support and documentation site has been launched for the category module:

http://category.greenash.net.au/

Anyone can register and login, and can start contributing to the site's documentation. The site itself is fully powered by the category module, and so far is proving to be a great example of how easy and powerful the module is when put to the test.

From now on, all important announcements, such as major release notes, will be posted to the news section of this site. Feel free to use this and other forum topics on drupal.org though, and keep filing bug reports and support requests through the drupal.org issue tracker! No issue tracking will take place through this new site.

Happy holidays,

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

venkat-rk’s picture

Thanks, Jaza. But, I got an 'Access denied' message when I tried to add a category after logging in.

Jaza’s picture

Regular users are only allowed to post categories, not containers. I looked for you in the site's logs, and according to the watchdog, you tried to create a container.

Try going to a page on the site when logged in, and clicking the 'add child category' link at the bottom of the page. You should be able to do this, although the category won't be published straight away.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

gmak’s picture

I've got the Category module up and working, and I have to say it looks great. I've read here that this can be used in lieu of the Book module, but I can't really see how this can be achieved.

Is there an explanation of this functionality somewhere?

Thanks

Anonymous’s picture

Clipper module can do the same thing as the book module, with any node type and is based on the same idea. Can category module do relationship types like child/ parent and related terms. Theres at least 2 other drupal modules that can do relations and do relation types in some form. generalized relationship module may be of interest.
Havn't really tested it yet, but it installs ok and seems to work with existing stuf without breaking. The term-as-nodes is an interesting feature, though im not sure how it would work in production sites. Also, taxonomy_import or something may help out.

gmak’s picture

Does the Category module work with the Glossary Module? I don't seem to be having much luck with the two of them.

Jaza’s picture

The category module has been extensively tested with the glossary module, and does work with it. Make sure you copy the taxonomy.module.copyme file to your site's /modules directory, and rename it to taxonomy.module (overwriting the taxonomy module that comes with Drupal). Then make sure that the (wrapper) taxonomy module is enabled on your site's "administer > modules" page.

Please let me know the details of any further problems that you may have with category and glossary - I'm keen to get popular taxonomy-dependent modules such as glossary working well with category.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

rport’s picture

Thanks for your contribution Jeremy,

Do you need to add the following to the INSTALL.txt?

copy the taxonomy.module.copyme file to your site's /modules directory, and rename it to taxonomy.module (overwriting the taxonomy module that comes with Drupal). Then make sure that the (wrapper) taxonomy module is enabled on your site's "administer > modules" page.

Russ

gmak’s picture

With the glossary module, here's what I've done:

1. Create a container called Glossary
2. Created a category under Glossary called Blah and defined the term in the category description field.
3. Enabled the glossary filter for all of my input types and selected Glossary as the relevant category.

Now, if I edit an existing node, story, page, etc. or if I create a new piece of content including the word 'Blah', I am getting no glossary reference. I've tried all of the notation methods (superscript, icon, acronym), but none of them appear.

I am running Drupal Core 4.7b2, most recent Category and Glossary 4.7.0.

I'm not getting any errors appearing in the logs.

Any suggestions?

Jaza’s picture

I had this problem too when I was testing. I was tearing my hair out trying to work out what I hadn't done. Here's what I worked out:

Apparently, you have to give each term / category a description in order for the glossary module to pick it up. So for each category in your 'glossary' container, go to the 'category information' fieldset, and type some text in the 'description' field. The glossary terms should then get highlighted in your posts!

I guess the glossary module works like this because it figures that if the 'term' has no 'definition', then it's not worth linking to it. If you ask me, it's a bit of a pain, but anyway... Hope it all works for you now!

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

gmak’s picture

I've given each category some text in the category description field under the 'category information', but still nothing shows up in the body of the text.

Any further suggestions?

FlowDesign’s picture

category_access: (coming soon) taxonomy_access-like permissions.

What will this do exactly?
Will it set permissions for categories like you can set on nodes with the node_permissions_byrole module?
(Would be logical as a category is a node.)
Or will it also implement permissions for the menu links that are created for the categories and/or containers?
I've seen it is possible to 'hide' category links from the menu, but I believe that it would be very useful if you can set permissions for menu links by role.

Dave Cohen’s picture

I can't speak for Jaza's plans regarding category_access, but I have my own ideas and you can see a prototype here: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/yogadex/modul...

It allows you specify a set of categories which imply privacy. Then for each user you can specify which private categories they can see.

It's a work in progress so your mileage may vary.

I have just contacted Jaza about this and I hope to join forces going forward.

kwillett’s picture

I installed category_access 1.4 and got it working without problem. It seems to work fine for pages, but I am having trouble with hiding menu items as described in the caveat comment.

My site was already set up. I tried edit/save on a page with an associated category menu item, but the menu item still shows up. Then I tried deleting the menu item, then recreating it by setting the Menu Settings option on the page. The menu item reappeared for all users (though of course you get an access denied error when you click on it).

Is there a recipe for hiding the menu items associated with existing pages, short of deleting the pages and recreating them?

Thanks -- Ken

Dave Cohen’s picture

A couple things about category_access:

First, I exchanged some email with Jaza, and as a result I am renaming my module, probably to cac_lite. It does not (and will not) support all the features Jaza wants in category_access.

Regarding the menu items showing up. If what you're seeing is truly a menu item, I don't think an access control module can hide it. The caveat in my comments refers to hiding the category nodes themselves. Essentially it says that to hide a category that controls access, it must be configured to categorize itself.

Does that make sense? If not, perhaps we should move this thread to a new node.

ec’s picture

I tryed to use views with category by using the taxonomy_wrpper but I could'nt see any categories nor containers in the views filter. Does any body knows if they work together ? Views + category or Category + views could be a killer app !
Eric

merlinofchaos’s picture

As of yet there is no Views/Category integration. I'm hoping Jaza will take this as a challenge and do it, though; it shouldn't be all that difficult to do.

-- Merlin

[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

Jaza’s picture

Integration with the views module is most definitely on my todo list for category! I'm very sorry, merlin, but even though I've heard so many good things about views, I still haven't tried it out, let alone have a look at the code yet. I will check it all out as soon as I can get round to it, and will then work on some integration.

I'm imagining that views integration will be happening with category_display, since it fits in with the existing settings of that module, which are all about controlling the visual look of each container and its categories. The navigation display can already be configured; the tagged links display can already be configured; it will be the final piece in the puzzle when display of the node listing itself can be configured!

I'm hoping I can ask you any questions I may have, when I get round to having a look at the views module? ;-)

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

merlinofchaos’s picture

Absolutely. There's also some decent documentation for module developers. Not great but not bad.

-- Merlin

[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

olet’s picture

ahh,just see your
"distant parent moudule" and four thoughts on your blog :
1\ Basic breadcrumbs and taxonomy
2\ Cross-vocabulary taxonomy hierarchies
3\ Hierarchical URL aliasing
4\ Showing sneak previews in Drupal

this category module has a relationship with them?

egfrith’s picture

After having played with taxonomy_assoc and hacking the taxonomy_menu code so that it can display single terms in a hierarchy (I also had to hack menu.inc to get automatic menus working), I've come accross the category module.

It looks very cool, and just what I've been wanting, apart from the fact that installing it takes me away from standard drupal, and by nature I prefer to stay as standard as possible.

I know that there is the compatibility module, but from http://category.greenash.net.au/taxonomymodules it looks like relatively few modules are working. Besides, suppose I decide I want to go back to taxonomy in the future, I would have to convert all the category information I'd accumulated back into term information.

So, my question is, what has been the reception of the core developers to the category module? Is it likely to replace the taxonomy system? Or might the taxonomy module be tweaked to emulate some of the features of category?

I suppose these may not be questions anyone here can answer :-( I dare say that I will try out category anyway :-(

BTW, if anyone is interested I have converted taxonomy_assoc up to 4.7. I haven't put patches in as it looks like catetory is set to superceed taxonomy_assoc ; another reason for asking the questions.

venkat-rk’s picture

BTW, if anyone is interested I have converted taxonomy_assoc up to 4.7.

Could you get it working with aliased paths for 4.6?

Regarding the category module, while one can't say if it will get into core, it has at least one experienced drupal developer very excited

----
Acknowledging a reply to your question motivates the replier to answer more.

egfrith’s picture

If by "working with aliased paths", you mean being able to assign a taxonomy term a url alias, and this being displayed properly on the taxonomy page, yes, this seems to work -- in my 4.7 beta drupal installation at least. I didn't have to do anything to fix that.

Thanks for the pointer to the article -- interesting.

venkat-rk’s picture

Thanks! This issue explains it better, although the links mentioned are dead:
http://drupal.org/node/34347

I didn't bug Jaza about it because I realised he was working on the category module, but if you were able to get it going, I would like to give it another try. Currently, I am using taxonomy_context just to get the term description (and for nothing else) as a kind of intro for the term page, but taxo_assoc is much better.

----
Acknowledging a reply to your question motivates the replier to answer more.

egfrith’s picture

I haven't tried to fix this issue :-(. If I was committed to using taxonomy_assoc I would perhaps try, as it sounds pretty annoying.

However, I've just had a play with category, and am so impressed by its coolness, that I'm not sure I will be using taxonomy_assoc. But I will let you know if I do fix it.

I suppose that there might be a place for taxonomy_assoc in the future for the conversion from category to taxonomy. E.g. there is a category with some nodes assigned to it and you want to turn the category into a term. For the conversion to be lossless, you need to do something with the body of the category. I suppose this might be achieved by making a new node out of the body and linking it to the term with taxonomy_assoc. But I suspect Jaza has more elegant ideas :-)

Jaza’s picture

Thanks for that link - cool, some PR for the category module! :-p

Jeremy Epstein - GreenAsh

venkat-rk’s picture

My pleasure:-) It is the least I can do at the moment for your superb module.

----
Acknowledging a reply to your question motivates the replier to answer more.

Jaza’s picture

The category_legacy module is currently the no. 1 outstanding task on my todo list. This module will allow you to convert taxonomy data to category data, AND vice versa; the same two-way conversion will be possible for book data. Once this module is available, you won't have to worry about being 'locked in' to the category system, you'll be able to switch back to taxonomy and book at any time.

The taxonomy wrapper has only been tested with relatively few modules so far; in actual fact, it probably works with many more modules. There are a lot of taxonomy-dependent modules out there: feel free to help out with testing them, I can't do them all!

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

chcgeek’s picture

Doe this module work with OG? If not is there a plan to in the future? Cagegory will get my site organized as I like and OG will allow me to have restricted access based on subscriptions rather than roles. How happy my life will be if both work together. But if they don't now I will stick with Category so that my site will be properly structured and eagerly await the time when they play nice with each other. :)

Thanks for your work on this very useful module.

Barbara
aka "Chaplain Geek"

PG-1’s picture

What about multiple term compilation on one newsline, like it done in taxonomy?

(URL syntax like "taxonomy/term/1+2+3" or "taxonomy/term/1,2,3")

Jaza’s picture

Building a custom node listing is still possible with category, the same as it is with taxonomy. Instead of "taxonomy/term/1+2+3" or "taxonomy/term/1,2,3", you now go to "category/1+2+3" or "category/1,2,3".

I should document this on the category module web site - or feel free to beat me to it!

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

PG-1’s picture

Suggestion: the module giving to site users an ability to combine this URL manually, by plural choice from the list of a categories tree.

TomArah’s picture

Just to say that you might need to look under the the URL Aliases section to find the relevant numbers (I'm using pathauto for automatic aliasing).

Maybe you could indicate them in the Outliner view?

PG-1’s picture

I remind: we need to change sorting and view order for some terms.

So, we need some equivalent of view module or taxonomy API legacy.

mcreature’s picture

I recently installed a new copy of Drupal cvs and the Category module, Displays module, etc, Very nice modules indeed.
Thank you Jaza, and every one ells that has contributed.

I also tried the Taxonomy context module to se how they would
Intermix, or if they could co-exist at all.
As expected the answer was short, "no, because the Category module is displaying the breadcrumbs like Taxonomy context did among other things.

For my purposes I wanted to display second level descriptions, along with the main level description, as taxonomy context does, so I spent a good part of last night and this morning trying different combinations.
The main differences that I can se, in the way the modules can display levels, is that the Taxonomy context module displays the help text = description text, for terms along with there second level sub terms and sub term description text, plus breadcrumbs, and the category and category display modules can display main content of a given category along with a list of links to a number of sub levels, plus breadcrumbs . Both modules along with Taxonomy module can display content pages or teasers in there respective categories.
So I thought hmm, I will just need a child category to do the display work for me. It worked sort of, but I had to turn off the top container visibility, so all these categories wouldn’t get repeated at the top level again, so no list view either.

Is there a way to turn off just the sub page teasers at the top level, but keep the list links and still have sub teasers for lower levels?
I have found that mixing the two gets quite repetitive.
It would also be nice to utilize the description text in the same view
Like taxonomy context, and if possible have a choice to only display the menu block level when viewing its pages, like taxonomy context. I know that it is possible to only display blocks for certain categories, but it would be a lot of work to keep up on. Maybe there could be a module like Category context, that works with Category module, or possibly part of the Category display module that also gives a choice of displaying the description text with or with out list view. I am looking forward to the Views Module hooks for overall display.

for some ideas..
Here is a drupal based nature site that implements a very complex categorization system, and defiantly worth looking at in terms of layout and structure. The author is using a older reworked drupal version and his own modules. One thing worth mentioning is that as complex as the sites categorization is, the registered users need only view that category to place content there http://www.bugguide.net

Thanks again for all your hard work Jaza.

gmak’s picture

I see that the category_display.module has some theme_ functions, but (being a newbie) I'm not clear on how to use these.

I'd like to be able to change where the navigation shows on the page. At present it appears above the actual items shown, and I'd like to put it below.

How/can this be achieved?

Thanks

jacobson’s picture

I just installed the CATEGORY modules. I enabled all category_ modules. When I clicked Submit, I got:

Fatal error: Call to undefined function: menu_get_item() in /home/jacobson/public_html/webdev/modules/category/category_legacy/category_legacy.module on line 564

HAJ

Jaza’s picture

The menu_get_item() function is part of the improved Drupal menu API, which was added to the code base on Jan 19 (11 days ago). If you're getting that error, then your Drupal version is out-of-date, and you will need to upgrade to latest CVS.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

lias’s picture

lsabug

jacobson’s picture

The error I reported disappeared, so I believe so.

HAJ

jacobson’s picture

I have installed the Category module beta with Drupal 4.7.0-Beta4. I enabled the legacy module and performed a legacy import. The import seems to have created duplicate menu entries. When I go to administer > menus, I see some duplicate menu items of my imported taxonomy vocabularies and terms, and in one case a triplicate of one vocabulary and terms.

HAJ

jacobson’s picture

I attempted to change the properties of a container that was imported by legacy_import. Whether I make no change to the container's properties or make changes, I get this error:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/jacobson/public_html/webdev/modules/category/category.inc on line 904

Sometimes, the error is reported at line 905 instead of 904.

I do not get this error on any other part of my site.

HAJ

jacobson’s picture

When editing a node that was created before I installed Category, I get the error message below when I Preview the node:

You have not selected a term in the taxonomy you assigned to daily items.

However, there is a Daily category assigned to the node. The error message seems to suggest that the taxonomy wrapper module is reporting this error since the message refers to a taxonomy, not a category or container.

HAJ

jacobson’s picture

I have tried with various cateogories and items to create and modify menus through the container, category and item editing pages. The module does not edit menu position correctly. Changes to the menu parent seem to be ignored, and deleting a menu does not seem to work. You need to go to administer >> menus to change the menus.

HAJ

Jaza’s picture

Could you please refrain from posting all of your category-related problems in this thread. If you encounter any bugs while using the category module, the correct action to take is to post a bug report at http://drupal.org/node/add/project_issue/category.

Thanks,

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

jacobson’s picture

I will do so. Thank you.

HAJ

jacobson’s picture

The category module site states:

"All output generated by category_display is contained within themable functions, which can easily be overridden by your site's theme. So if you don't like the way category_display formats your categories, you can change it yourself without hacking any module code."

I do not quite understand how to use this information. In other words, what does it mean to say that category_display is contained within themable functions? How does one override these functions in one's theme?

Thanks.
HAJ

stBorchert’s picture

Look at Overriding other theme functions. There is a detailed description on how to customize the output of themable functions.
Unfortunately with category_display only the navigation is themable by now: theme_category_display_navigation()

@edit:
I have to correct myself: you can theme several functions. Take a look at category.module. There is (for example) the function theme_category_view. Overriding this function enables you to customize the display of each category (for example: show only the titles of nodes, ...).

hth,

Stefan

dfeiock’s picture

Is there currently a way for the display menu to hide categories that do not have nodes?
eg:
Container1
-Category1
--node1
-Category2 (hidden since no node)

I am beginning to work with this module a bit and will see if theres anything else that comes to mind.

- DF

dfeiock’s picture

Also, besides hiding empty categories... Is there a way to seperate a container based on its parent? eg:

Container1
-Category1
--Container2
---node1
-Category2
--Container2
---node2

From what I can tell, only containers can be selected when creating content (pages for example). By being able to do the above, and hiding empty categories, then a scenario like this could exist:

State (container)
Indiana (category)
Ohio (category)

Departments (container)
IT (category)
Admin (category)

Content Type (container)
Policy (category)
Procedure (category)

Then for tying these together, building a menu like so:
State
-Indiana
--IT
---Policy
----node1
---Procedure
----node2
--Admin
---Policy (hidden since no node)
---Procedure
----node3
-Ohio
--IT
---Policy
----node4
---Procedure (hidden since no node)
--Admin
---Policy (hidden since no node)
---Procedure (hidden since no node)

This way the interface selections for a user adding content are simply State, Departments, and Content Type. And by adding a node to Policy under IT for Ohio will not necessary link it to Indiana IT Policy.

Also, if this is beyond the scope of the functionality for the category module, any suggestions of what can?

Thanks!
- DF

bmargulies’s picture

If this module does what the original post called for it to do, then it will solve my problem once I'm prepared to upgrade to 4.7. I'd be grateful for a confirmation.

I want to be able to take the same sort of taxonomy that I can apply to a link, and use it to define a page in a book. Thus, just as I can have a menu that yields a page of nodes that satisfy a set of terms, or a link, I will be able to have a page that can have a parent.

I have also been thinking about a related item: a filter that would allow me to ask for the content of a node set (specified by taxo) themed 'right here'. This would obviate the article module with something much flexible.

Jaza’s picture

I want to be able to take the same sort of taxonomy that I can apply to a link, and use it to define a page in a book.

Yep.. it does just that. ;-)

Jeremy Epstein - GreenAsh

robhamm’s picture

First off, I love this module.

One question, though, which may sound like a no-brainer: What, for practical intents and purposes, is the difference between a container and a category? Yes, I understand that containers can hold other containers and categories, but can't categories also contain other categories?

Also, just to clarify--If I, for now, launch my new site with 4.6.5 using the half-dozen modules that Categories replaces, how much (if any) hassle do you anticipate from going to 4.7 with Categories Module? Are there any concerns you are aware of with Organic Groups (other than the og forums glitch, about which I'm not overly concerned)?

Thanks for your patience.

Rob Hamm
http://www.bluecrashkit.com

Jaza’s picture

robhamm’s picture

My apologies. I guess I missed that.

Rob Hamm
http://www.bluecrashkit.com

Montuelle’s picture

Jaza,
I don't know if you are aware of the following thread: http://drupal.org/node/48832 but it seems that the release of your category_module will be welcomed by many.

Thanks for all the fantastic work you have already done.

liquidcms’s picture

Hey Jeremey, et al

I have a pretty big post to throw up somewhere with a description of what i think i can do / would like to do with categories for my site (and future sites). It gives example site and asks a few questions as well as maybe makes suggestions for future work based around categories.

Just wasn't sure this was the right forum topic to post to. Thought i'd check first.. :)

questions are based on category based:

- menus
- control of dynamic content
- templates
- etc.

i guess if anyone suggests this is right forum.. i'll post away.. its already written..

cheers all,
great work Jeremy,

peter...

Jaza’s picture

You can post stuff like that here. But if what you have to say is really long, you might want to post it as a new forum topic, and just post a comment here that links to it.

Jeremy Epstein - GreenAsh

liquidcms’s picture

TomArah’s picture

First of all thanks for the fantastic work Jeremy - the taxonomy system was what made Drupal stand out but this is leagues ahead again (and that's only understanding half of it :)

It's so good I kept thinking there had to be a catch and, following up on Peter's thread , it looks like there might well be one: the inability to add container/category based PHP snippets?

The automatically generated menu system is great for many users but a hardwired approach is never going to suit everyone - especially if it can only list a node under one menu when the beauty of Drupal and Categories in particular is that you should be able to drill through to content from many angles.

From the sound of it, integration with Views (also fantastic) should largely address the issue by allowing the creation of node-based blocks for inclusion on custom home pages and as targeted blocks?

However, if correct, that would still leave the area of context-sensitive processing where I think snippets are necessary - for example to provide a context-sensitive alphabetical directory listing with or without subcategories.

I'm still struggling to get my head around all this, but is this right?

mcreature’s picture

Hmm a categorization topic for uses and new ideas sounds like a good idea.

0207100’s picture

Hi,

I just installed Category on a fresh 4.7 install, no other mods or anything.

I was so hoping this would solve all my problems with categories and KAAABOOOOM

Fatal error: Call to undefined function: menu_save_item() in /home/blogdyna/public_html/drupal/modules/category/category_menu/category_menu.module on line 544

any one have a fix for this?

Jaza’s picture

Jaza’s picture

(this is a reply to this comment)

Thanks for pointing out that "catch" of the category module, TomArah. Let me just clarify some of the things that you mentioned:

The automatically generated menu system is great for many users but a hardwired approach is never going to suit everyone...

That's the thing, you see: although it may seem "hardwired", the category_menu approach is in fact quite flexible. It does not automatically generate the menu system itself. What it does is automatically put menu items in the database, which the menu module then takes and uses to generate a navigation block. So if you wish, you can go to 'administer -> menus' on your site, and customise the menu structure that category_menu has generated. E.g. you can put the 'image galleries' page under the menu item for one of your categories - and this will be reflected in your navigation.

...it can only list a node under one menu when the beauty of Drupal and Categories in particular is that you should be able to drill through to content from many angles.

This is more a shortcoming in (or should I say, the reality of) Drupal's menu system, than a problem with category_menu. Drupal's menu system is a strict tree structure: a menu item can only have one position in the tree (i.e. one parent). However, the menu system does also support 'shortcuts', which are 'extra positions' of a particular menu item. Adding support for shortcuts to category_menu would be a great enhancement, but also a difficult one to implement - category_menu already has a hard enough time keeping track of one menu item for each category, imagine how much harder it would be to track more! Also, shortcuts have limited advantages, as some things (e.g. breadcrumbs) are still based solely on the position of the one 'non-shortcut' item.

As far as snippet support goes, you can write and use block snippets for the category module, just as you can with any other module. However, using category_menu is preferred, as it then gives you access to the powerful menu editing interface offered by the menu module.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

TomArah’s picture

Thanks for that Jeremy. I hadn’t realized how central the whole menu system is. I can see that it’s very powerful in that you can effectively customize your menu navigation and breadcrumbs by renaming items, moving them around etc, but it’s also a bit confusing/dangerous unless the underlying architecture is made clear (I didn’t understand the implications even after reading your post so was gaily moving menu items into new menus, deleting those I didn’t need etc until I realized I was destroying my breadcrumbs)

Regarding the single menu restriction, even though it’s not of your making, I think that this is another major issue that should be highlighted up-front. And I think that the end result will be that most sites with multiple routes to content will end up switching off menu items for nodes and sticking to breadcrumbs (incidentally I think calling these options Disabled, Breadcrumbs Only and Breadcrumbs & Menu would help make things clearer and more friendly).

These sites will then need a way to generate relevant node links based on categories which is where snippets come in. I’d misunderstood what you’d said in the previous thread deprecating snippets and thought that they didn’t work with Categories so I’m delighted to see that that’s not the case – though I still can’t get this very useful snippet to work.

In fact in the light of this (ie agreeing that avoiding snippets would be preferable as they are definitely a hurdle for most users, me included, but still needing a way to provide the essential node listing functionality) I’d like to suggest another module to be added to the overall Categories module (sorry :). What I’m thinking of is a Category_Listing module for generating node listing blocks for navigation (effectively incorporating and extending the current Taxonomy Block module).

Thanks to your complete reworking of taxonomy you are uniquely well placed to offer this as when you create or edit a container or category you could have a section for determining how its associated node listing should appear in the same way as you currently have sections for controlling category display and menu settings. This would enable you to customize the resulting listing – sorting by date or name where appropriate, optionally including links from child categories, setting the number of nodes, setting which other categories’ nodes to list if the current category’s nodes falls below a certain threshold etc.

Listings could then be output one block per category – this would work particularly well with the excellent BlockBar module – or one master block per container – which would offer more control and make block targeting a lot simpler (and something like the snippet above would provide an alternative collapsible menu solution without the single node listing problem). Building up from this the ideal would be a single, highly customizable, context-sensitive and intelligent Categories block to handle the node-based navigation for the entire site – just make your settings and switch it on!

I realise that you’ve got a huge amount on your plate already (and I’m stunned by what you’ve achieved), but I feel that this would round the module out, address the menu item problem, provide a lot of power that would benefit all users, bring all the major separate taxonomy modules under one roof and mean that Categories really does provide a total one-stop organizational and navigational solution for all sites.

Thanks again.

Jaza’s picture

There is no perfect solution to the problem of categories with multiple parents, or of nodes assigned to multiple categories. However, in the basic hybrid structure tutorial, I explain one practical solution / workaround for it (described mainly on this page - but you really should read the whole thing in order).

Essentially, my advice is to not bother trying to reflect multiple parents / assignments in breadcrumbs, as it simply cannot be done with Drupal's breadcrumb system. Instead, architect your category structure so that you have 'master categories' - points in your tree that act as a single, reliable parent.

As for taxonomy_block, it should theoretically work with category through the taxonomy wrapper (this is untested - feel free to give it a try, and to report your findings). I have no plans to port this functionality to a category_block module, but if it's an itch of yours, perhaps you might want to scratch it. ;-)

Jeremy Epstein - GreenAsh

TomArah’s picture

Thanks for the tips (I had read them but they take a lot of re-reading :)

As for my suggestions regarding another module to provide a section for controlling and generating node listings for menus... on reflection I think you are probably wise to keep Categories concentrated on organization. The good news is that I hadn’t realized just how far Merlinofchaos has taken the Views module in this direction, another fantastic improvement to 4.7 (the theming capabilities look particularly useful here for generating menus). Categories and Views working hand-in-hand definitely looks like the best way forward and I’ll happily leave it to you two experts.

ser’s picture

How to display (x) most recent nodes from a container (not category)?

marcoBauli’s picture

Playing around with this great module, i am trying to reproduce the structure i posted in the following thread:

http://drupal.org/node/54070#comment-104204

Briefly here, the scope is to have a global container of tags (categories) showing in *all* other content types and categories, in order to filter listings of nodes in all categories by specific tags.

any help would be extremely apreciated!

thx

marco

jvandervort’s picture

I only had a 'Home' breadcrumb for nodes and cats in a simple hierarchy, until:

1. I set Menu items within this container to enabled, but disabled
2. I needed to set the menu title for all of the cats to be something other thank blank.

I don't know if this is, 'as designed' or not.

-JV

-John

seanberto’s picture

I am basically trying to create a peer-to-peer review system with Drupal. I would like site users to be able to add "reviews" which were written by "researchers" about other 'researchers".

So, when an end user creates a "researcher" node, I need this node to be available in two vocabularies (or containers, if we're in talking category module terms). Does anyone have suggestions about the best way to do this?

Working in 4.6 without the categories module, I've been trying to use NodeTag, but that can't create 2 taxonomy terms (in different vocabularies) for a single node entry. Any thoughts?

-s

Sean Larkin

divrom’s picture

What stage is the category module at?

I'm about to re-build a site with a hundered or so users and thousands of nodes, because so far it's all books and orphans pages. I was planning to use taxonomy (that I have so far avoided), but category would be perfect.

Is it still not safe to use on a live site?

venkat-rk’s picture

I think it is quite stable right now.

Frankly, it has such an amazing array of features and helper modules, is so well thought-out (at least for me) and documented that it made me take a step that I wanted to do only three months later- try 4.7! While I haven't done anything spectacular, everything has worked so far. Of course,
Jaza still thinks the code needs cleanup;-)

Reading your description, you just need to import your existing book pages. There is a detailed tutorial on category.greenash.net.au on importing taxonomy data and book pages that should help you. Do pay special attention to the comments left by a user about the import process- they contain many useful tips.

tkgafs’s picture

I have been developing a site for my local theatre club

I have used CCK to create a node type called plays

this has several vocabularies attached to it for actors, actresses, directors etc etc

and the tags all come out nicely on the page but I have just discovered that the actual term names are not searchable themselves it would appear that only data in the actual page description seems to get searched

I have worked out that I could create a node for each person with their name as the page text and add all the relevant tags to it so that I could search on the persons names, but as eventually it is likely to contain a few thousand names I feel there has to be a better method.

So is there anything in the category module which would help with this problem

see http://cms.dibbletree.com/node/85
for an example of a play page

and http://cms.dibbletree.com/node/90

for the only node created for an actor at this point

dont worry about the odd colours thats only to help me debug the curved_slate theme

tkgafs

Jaza’s picture

The stable 4.7 version of the category module (and co.) has now been released. You can read all about it here:

http://category.greenash.net.au/node/145

This forum thread will now be closed. Please continue to post your issues to the module's issue tracker here on drupal.org, and to contribute documentation to the category module web site. You can also post new forum topics here on drupal.org, relating to the category module, but there is no guarantee that they will be seen by everyone.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh