Custom blocks

a.a.egoroff - January 7, 2008 - 02:59
Project:Taxonomy Filter
Version:5.x-1.1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Greetings! I’ve just discovered this amazing module, and I think it is good. Damn, it is really good! If my ideas seem interesting, I can publish them in feature request. And I think is really not bad feature:)
So. What do we have? Simple, but glaring example. I have a test site with content type “product” and the two vocabularies assigned to it: “Vendor” and “Type”.

“Vendor” has following terms:

  • Cisco
  • D-Link
  • Canon
  • HP
  • Linux
  • Microsoft

“Type” has

  • Routers
  • Switches
  • Printers
  • Cameras
  • Software

I chose these vocabularies and terms for my example, because everyone knows that Microsoft does not make printers;) Also, I have a dozen of test nodes. So far, now with built-in capabilities of module I can render something like this.

List #1.

  • Cisco
    • Routers
    • Switches
  • D-Link
    • Routers
    • Switches
  • Canon
    • Printers
    • Cameras
  • HP
    • Printers
  • Linux
    • Software
  • Microsoft
    • Software

List #2.

  • Routers
    • Cisco
    • D-Link
  • Switches
    • Cisco
    • D-Link
  • Printers
    • HP
    • Canon
  • Cameras
    • Canon
  • Software
    • Linux
    • Microsoft

Now these lists are displayed only on the pages like /taxonomy/term/{termid}.
In my small project, I want to create two blocks, which will appear on all pages "Type by vendor" and "Vendor by type". All I need is snippet to display lists №1 and № 2 in these blocks.

PS.
I plan to do:

  • lists #1 and #2 collapsible using jQuery
  • combine these lists to tabs with tabbed_block.module

That will have a very small and compact block with a very comfortable and functional navigation on the site.
As an UI designer, I think that it would be very convenient for users and correctly in terms of usability.

Help please.

#1

styro - January 7, 2008 - 10:26

I think I get what you want to do, and it sounds like a good idea for a custom interface design.

If I understood you correctly I'd describe it as a bit like an intertwining of two vocabs with each tab coming from the opposite direction.

Correct me if I'm wrong, but this idea would work best with (or only with) non hierarchical vocabs? ie intertwining two trees would get very confusing I imagine. The majority of taxonomy_filters increasingly complex code is for dealing with trees of terms, and all kinds of configuration options.

While it has the same high level goal as taxonomy_filter (eg getting intersection sets from multiple terms), the actual internal operation would be quite different. I think starting from scratch would be easier and cleaner than reworking taxonomy_filter to work that way.

Who knows maybe my (still on the drawing board) Drupal 6 version with it's pluggable APIs and submodules could handle it? But I doubt the Drupal 5 codebase could do it.

Unfortunately I'm too busy to do any real development in the immediate future - our office building had a fire (our floor only got the smoke luckily) and I'm in the middle of relocating a bunch of servers and developers while the building gets repaired.

I'd be keen to answer any coding questions when I get time though. It's a tempting idea and would be good for someone to implement. An initial version that hardcodes some of your assumptions would be easiest - eg just working with 2 flat vocabs and no config options.

#2

styro - July 14, 2008 - 04:48
Status:active» won't fix

Just closing off some old issues. Please reopen if still a problem in latest supported versions.

 
 

Drupal is a registered trademark of Dries Buytaert.