One additional feature would make this module perfect for our needs: an option to show the current node in the list with an "active" class applied so it would be highlighted.
I imagine that this wasn't your module's original intent, but for some applications it would help provide context to the users, i.e. acting like a taxonomy-based menu of nodes.
I haven't found any other way to get this behavior - if there is, please do nudge me along in the right direction.
Thanks for the great work!

CommentFileSizeAuthor
#9 similarterms.module.zip2.7 KBpetertj

Comments

rmiddle’s picture

Interesting I though the query didn't include the current node at all. Need to check that.

Thanks
Robert

petertj’s picture

Thanks for the quick reply... and no, you're right, it doesn't. I'm actually asking if that could be implemented as an option, so you can see the current node .active (highlighted) in the list of related nodes.

petertj’s picture

Hmmm... I found an interesting thread along these lines: http://drupal.org/node/65375

Looks like they've created Views blocks that do exactly what I want, but I'm not getting their layered argument approach to work in Views 2 under Drupal 6 - your module would be a lot simpler.

rmiddle’s picture

petertj,

I don't understand why that is useful. It might be doable but I have to understand why it is useful?

Thanks
Robert

dman’s picture

Very useful if you use a list of related nodes as a cheap context-sensitive menu.
Heirarchical menus show the current page in context, so it's not a totally silly idea.
A shallow site I'm doing today does exactly this (using a splash of php, not this mod)

... but this leads to any easy answer - the link to the current node will have class .active set, so just theme that!

petertj’s picture

Thank you, dman - that block snippet may be just what I'm looking for - I'll try it out.

rmiddle - I've been looking for a good solution for a taxonomy-based block content navigator, and similarterms is the closest I've found so far. Here it is working on our development site: http://atma.syn8.com/media-forum/articles/brief-history-media

Play with it for a minute, and I think you'll see what I'm going after - an option to show the current node .active could make it a great complement to the category navigation in the menu.

I'm keeping the primary/secondary menu heirarchy simple, based on multiple flat taxonomies, letting the sidebar block provide direct content navigation within a category.

Thanks for considering it!

rmiddle’s picture

Ok I see what you are doing never though about using it like that. Let me see what I can figure out. Also if you write up a patch I will likely accept it.

Thanks
Robert

petertj’s picture

I found a quick and easy solution that meets our immediate needs - simply comment out two places in the SQL query where the current node is being filtered out: 'AND n.nid != %d '.

I don't image this makes for a patch since it removes part of your original intended design. I'm not yet familiar with Drupal's module UI coding, I'll take a look and see if I can figure out how to make this an optional feature.

petertj’s picture

StatusFileSize
new2.7 KB

Okay! That was easier than I thought. Copied some functions from other modules to add a simple checkbox to the Block UI, save its state as a variable, and then use that to determine whether to insert the filter into the query. Not sure if my method of inserting the filter is optimal, but it works.

You can see it in operation at http://atma.syn8.com/media-forum/quotations/way-transformation - it now does exactly what we want. The revised module file is attached for your review (search for "showcurrentnode" used in my UI, variable name and comments).

This is my first module revision, and I'm not yet set up to roll an official patch. (I'm a UI designer and information architect by trade - not really a coder, but I've played one on TV.)

Let me know what you think!

rmiddle’s picture

I will look over the patch and see about integration. As I said I can see it usefulness.

Thanks
Robert

rmiddle’s picture

Status: Active » Needs review
Rob T’s picture

Thanks, peterj, for the modified module file. It's just what I needed.

rmiddle’s picture

Status: Needs review » Fixed

Rob T,

There is a glitch in that file in that it if you turn it on for 1 block you turn it on for all blocks. I fix that.

petertj,

Cleaned up a little and committed to CVS will be in 1.11.

Thanks
Robert

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.