So a really obvious plug-in would be to match against taxonomy terms.

I know how to do this in D6, but D7's taxonomy are fieldable and don't know the field API.

Patches greatly appreciated!

Comments

ericduran’s picture

Hi @JohnAlbin,

I started working on this but I haven't finish. You need to use the entity api to get the data. I've already got the taxonomy form working. I'll try to post a complete patch tomorrow.

Regarding getting the vids of the current node you can do this:

<?php

function menu_position_entity_load($entities, $type) {
// if you're going to do a taxonomy term page maybe a hook_entity_view is better than load
  if ($type == 'taxonomy_term') {
        foreach ($entities as $entity) {
        dsm($entities);
      }  
  }
}
?>

Hope this helps, I plan on submitted a completely patch, but the entity API is also new to me, So I'm learning as I go. I'll probably try to put up a documentation page after I finish.

johnalbin’s picture

Sweet! The entity API is totally new to me as well. Thanks for the help!

johnalbin’s picture

The d6 version has a taxonomy plug-in now.

johnalbin’s picture

Status: Active » Needs work
StatusFileSize
new10.49 KB

Here's a not-yet complete patch for a taxonomy patch.

The menu_position_menu_position_rule_taxonomy_form() and menu_position_taxonomy_autocomplete() should be working. The other functions are only partially finished.

binford2k’s picture

subscribe

artis.bajars’s picture

Status: Needs work » Needs review
StatusFileSize
new13.39 KB

Here's a patch, continued upon the work started in #4, that gets taxonomy conditions working. Should apply cleanly to 7.x-1.x-dev. Please test.

rvilar’s picture

Status: Needs review » Needs work

This works for me, but when I attempt to use the autocomplete widget to enter the taxonomy term an error ocur.

mrharolda’s picture

The patch in #6 doesn't apply anymore on the current -dev. Any progress on getting this completed and merged into the module?

ropaolle’s picture

subscribe

duvrai’s picture

subscribe

valderama’s picture

subscribe

joakimekroos’s picture

+1

vikfroberg’s picture

+1

akanouras’s picture

Subscribing

Shadlington’s picture

Subbing

itangalo’s picture

For information: It is possible to use conditions on taxonomy terms by using this module's functionality from Rules.

For more information, check out #1163662: Functionality ported as a Rules action.

Anonymous’s picture

The patch from #6 worked for me, however I had to apply the patch using the old method "patch < patchname.patch" rather than the new git method described on the Drupal patch documentation page. I also had to fix a single merge failure, but no big deal.

Now things are working perfectly. Works just like the 6.x version did and allows me to really fine tune where menu items go. I haven't had any issues with the autocomplete field either. There is a slight issue where upon adding a term from the autocomplete field the taxonomy tab only shows what I typed, not what the actual term is, until I save the form. Then it shows the full term correctly. Not a huge deal, but might be slightly confusing.

Getting this committed to the dev branch would be great.

meus’s picture

subscribe

jonasdowney’s picture

subscribe

jlenni’s picture

subscribe

rogical’s picture

+1 seems not ok to set menu position for taxonomy term pages yet

Mark Theunissen’s picture

Subscribe

m3n0R’s picture

Subscribe

verdaechtig’s picture

Subscribe

valderama’s picture

if you are using menu_block this module could be an alternative..

http://drupal.org/project/context_menu_block

itangalo’s picture

As pointed out in #16, it is possible to use Rules with Menu position to activate a menu item only if a node has a specified taxonomy term.

Here's a quick screencast showing how to go about it: http://nodeone.se/node/934
Here's an issue about getting more integration between Menu position and Rules: #1163662: Functionality ported as a Rules action

petrovichby’s picture

Subscribe

waynedpj’s picture

subscribe

attiks’s picture

sub

cangeceiro’s picture

according to the commit logs this was added on oct 5th http://drupalcode.org/project/menu_position.git/commit/25ea476 but i dont see this in the latest beta or -dev branches that were released on the 10th and 11th respectively.

johnalbin’s picture

@cangeceiro The drupalcode.org repository viewer doesn't do a good of showing this, but that commit is on a temporary feature branch called 7.x-1.x-963856. http://drupalcode.org/project/menu_position.git/shortlog/refs/heads/7.x-...

johnalbin’s picture

StatusFileSize
new11.48 KB

Latest work-in-progress patch.

johnalbin’s picture

Status: Needs work » Fixed
StatusFileSize
new13.45 KB

Ok. I think this works! :-)

anruether’s picture

Thanks a lot, John! Is this already in latest dev?

awolfey’s picture

#33 working for me.

Status: Fixed » Closed (fixed)

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

mrharolda’s picture

Status: Closed (fixed) » Needs review

Crap... Unless you're the maintainer of the module, of course...

Sorry for the noise!

mrharolda’s picture

Status: Needs review » Fixed

Assuming it's fixed and committed into -dev

Status: Fixed » Closed (fixed)

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