I'm planning the Drupal 6 port of Taxonomy Filter, and taking the opportunity to refactor it a lot in the process. The current module has turned into a bit of a monster over time and outgrown the original design.
Current ideas: Split it into multiple modules - eg a core API module and some submodules for the more advanced menu types. Possibly even split off certain bits of functionality (eg counting nodes in results) into optional extra modules. The idea is to both simplify the codebase (though the overall design will be more ambitious) and also allow other developers to easily add their own menu types or tweak existing functionality with their own modules. Also I'd like to make full use of the Drupal 6 theme function templating and make taxonomy filter more themable.
Any comments?
Comments
Comment #1
styro commentedPutting this on the back burner. If anyone else wants to take this on let me know.
Comment #2
styro commentedI've actually started work on this now :)
Comment #3
davidwebsters commentedI am testing your module and have some suggestions:
1. Could you make Multiple taxonomy filter categories? Currently your module is supporting 1,2 path structure. I am talking about 1,2,3,4 and so on path structure.
2. Node counter doesn't work correctly if you have 2 filters and more taxonomy filters.
3. How to set order of taxonomy filter menus.
Could you upload a HEAD version for testing...
Thanks in advance!
Comment #4
styro commentedThat has come up before: http://drupal.org/node/267578 and http://drupal.org/node/140440 for two examples. You can keep track of that on those issues. The Drupal 5 version won't get this functionality.
The Drupal 6 version will be way more flexible in this way. It should either be able to do this or come with a bundled addon module to enable this way of operating.
Could you file a separate issue for that. Note: you'll need to provide some more details in the new issue about what isn't working and how to reproduce it.
The Drupal 6 version uses the vocabulary weights for that - ie they will appear in the same order as your vocabs do. Not sure if the Drupal 5 version does that. If you really want that in the Drupal 5 version, file a new feature request.
I intend to upload an alpha version once I have some mostly working code. Note any alphas or betas won't migrate or keep your settings - you may need to create menus as the config data structures change. The final release should be able to migrate your Drupal 5 settings across.
Comment #5
davidwebsters commentedI wrote some snippets... The code is not pro but works... It was only written for main catalog categories and 2 filter categories...
INSTRUCTION:
1. Create 3 vocabularies with some terms (one for main catalog categories and 2 for filters) and name them as you wish, for example:
Catalog:
=======
Auto
-- Audi
-- Opel
Cellular
-- Nokia
-- Samsung
Filter 1st
=======
new
used
Filter 2nd
=======
in New-York
in Detroit
Be sure to check the same content type for all these vocabularies (for example, story), make them as required and then create some nodes.
2. Insert this code into template.php file of the currently used theme (by default located here: themes/garland):
3. Create 3 different blocks and insert there these codes:
Remember to check PHP code input format before submitting new block and then assign a block to a region.
Now browse you catalog and watch an address bar...
Comment #6
davidwebsters commentedstyro,
Courld you write a correct code to count nodes in currently selected terms?
I have no idea how to do that... Thanks in advance!!!
Comment #7
styro commentedPlease use separate issues for these questions or posts. This issue is for tracking the version 6 rewrite.
Note:
a) I already have working code (it is in a separate submodule) in the Drupal 6 version for filtering by an arbitrary number of terms.
b) The existing Drupal 5 version already has a function called _taxonomy_filter_count_nodes() for counting how many nodes match a set of terms - look it up. It is very similar to the builtin taxonomy_select_nodes() function.
Once I have the Drupal 6 codebase mostly working and the API / data structures stablised somewhat, I will release an alpha version for people to try out. Hopefully this will only be a week or two away, depending on the time I get to put into it.
Comment #8
styro commentedA Drupal 6 development snapshot is now available.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.