Hello,

While I was looking how to add a filter to the existing ones found in the admin/content page I found that some code pieces of the taxonomy filter exists. So I complete those pieces by adapting a about ten lines that I stole in drupal6.

The patch is for 7.x.

Hope it can be usefull.

Comments

drikc’s picture

Status: Patch (to be ported) » Needs review
jox’s picture

It's working well here. Thanks.

I've modified it to allow control over which vocabularies will be listed in the selection. I did it with a hook that allows to exclude certain vocabularies by their machine_name.

If there is interest I can contribute the code here.

Another nice addition would be to make this configurable in the admin interface.

jox’s picture

Oh, ok. I understand.

Then it would make even more sense to allow control over which vocabularies will be in the selection.

How about making the taxonomy filter optional and enable-able with a choice of vocabularies that will be included?

It would then be populated with a modified version of taxonomy_form_all():

taxonomy_form_options($array_of_vocabulary_machine_names);
frozenrey’s picture

SWEET!! THANK YOU SOOO MUCH! didn't try #4 but the patch works beautifully.

mediameriquat’s picture

I've just tried the patch on Drupal 7.12, and cannot make it work.

All it does is create a nice additional drop-down menu... but the contents are not filtered.

This patch seems to have been designed for an old dev version... I'd really like to see such a lightweight solution implemented into core.

The "Extended search page" module, as suggested in #3, kills my website. Drupal has too many bloated extensions that can't be used on shared hosting :/

mediameriquat’s picture

droplet’s picture

Version: 7.x-dev » 8.x-dev
Lehtóri’s picture

Status: Needs review » Needs work

The last submitted patch, add-taxonomy-filter-to-content-admin.patch, failed testing.

garphy’s picture

Same as #6 here.
Seems that although filtering options are prompted to user, there's no code to actually implement the filter on the query.
But BTW, there's not chance to see this re-included in core, is it ?

Alexandervn’s picture

StatusFileSize
new1.94 KB

Enhanced for Drupal 7.16.

wemakewebsites’s picture

Last one works nicely, thanks.

garphy’s picture

Status: Needs work » Needs review
StatusFileSize
new1.84 KB

Rerolled #12 for current HEAD.

garphy’s picture

Version: 8.x-dev » 7.x-dev

This is still for D7

kopeboy’s picture

Issue summary: View changes

I don't want to patch core, when this will be released?

dcam’s picture

Status: Needs review » Closed (won't fix)

This patch re-adds code that was intentionally removed by #693362: taxonomy_form_all() is dangerous. It's not going to be added back in. Maybe I should just change this to Needs work, but I really can't see this feature being added at this stage of the D7 lifecycle, so I'm closing the issue.

If someone feels like creating a solution that doesn't cause performance problems, then go for it. Personally, I would just make a View.

geekinpink’s picture

#14 patch worked...thanks a lot