the attached patch adds the following:
if a taxonomy listing returns no results, the user sees a message that says "There are currently no posts in this category." as opposed to an empty drupal template (current behavior).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | taxonomy.empty_category_message_setting.patch | 1.83 KB | nedjo |
| #3 | taxonomy_listing_no_result_message_0.patch | 1022 bytes | erikhopp |
| taxonomy_listing_no_result_message.patch | 1021 bytes | erikhopp |
Comments
Comment #1
erikhopp commenteddamn fingers...
Comment #2
nedjoThis issue is referenced here.
Comment #3
erikhopp commentedpatch updated to match drupal coding style (i think).
erik
Comment #4
Steven commented'taxonomy_render_nodes' indeed seems to be the best place to add such a note.
Committed to CVS/HEAD.
Comment #5
nedjoIn many cases, this message is indeed useful. However, there are cases where you don't want a message, or would like to customize the message. For instance, using the taxonomy_context.module, I often want to display a term descriptions followed by links to sub-terms in the category. See for example the Drupal 4.4 page http://gworks.ca/site/?q=taxonomy/page/or/8. There, I have a legitmate reason to leave categories empty of posts and a message that they are empty would be inappropriate.
Even when desired, I'd like to see the ability to customize the message. The message given by this patch is "There are currently no posts in this category." In some cases, you might want to say something different, like "There are no articles in this section."
The attached patch makes this a configuration option, with the ability to customize or leave blank as desired. I've also moved this from taxonomy_render_nodes() to a test for an empty result set before taxonomy_render_nodes() is called, to be more consistent with other Drupal calls (which typically don't return output messages if there are no rows) and hence keep taxonomy_render_nodes() flexible.
Comment #6
erikhopp commenteda version of the original patch was already committed to cvs, if you want to change this issue further, please submit a new issue.
Comment #7
(not verified) commented