Show child terms at the top of each page

felixsmile - May 12, 2007 - 00:21
Project:Taxonomy Menu
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Hello everyone,

Taxonomy menu is a really cool module, but I've wondering for quite a long time now how to implement a feature showing the child terms (only the "direct" child terms) at the top of each page, as taxonomy context module does it.

Is there any way of achieving this easily? If yes, I would be really glad if someone could show me how to patch my taxonomy menu module.

I think it would be worth it to integrate an option to show these titles on every page in the HEAD.

Thank you very much in advance,

Felix.

#1

felixsmile - May 12, 2007 - 00:33

Maybe there is a way of integrating Taxonomy List into it?

I'm just guessing, but unfortunately, the php code I'm looking at doesn't help me...

I would really appreciate your help, thanks in advance

Felix.

#2

brmassa - January 16, 2008 - 03:26
Status:active» fixed

Guys,

im a new maintainer and i just launched the new version of the module. it now has this feature.

regards,

massa

#3

Anonymous (not verified) - January 30, 2008 - 03:33
Status:fixed» closed

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

#4

Summit - September 21, 2008 - 19:34
Status:closed» active

Hi,

I set this to active. Using custom_url_rewrite in settings.php it is not working. I think taxonomy_menu should be working independend of this. My rewrite code is the following:

function custom_url_rewrite($type, $path, $original) {
# vocabulary = 2
$vid = 2 ;
$newpath = $path;
$depth = 0;

// This path was already aliased, skip rewriting it
if ($path != $original) {
  return $path;
}

// Rewrite to custom url:
elseif ($type == 'alias') {
  if (substr($path, 0, strlen("taxonomy_menu/")) == "taxonomy_menu/") {
  $termid = substr($path, strlen("taxonomy_menu/"));
// $termname = taxonomy_get_term($termid);
// $newpath = "resultaten/". htmlspecialchars($termname->name).".".$termid."/";
//   $newpath = "resultaten/". $termid."/";

  $tids = explode("/", $path);
   if (is_numeric($tids[4])) {
     $term = taxonomy_get_term($tids[4]);
     $newpath = "city-info/". $term->name."/";
   }
   elseif (is_numeric($tids[3]))  {
     $term = taxonomy_get_term($tids[3]);
     $newpath = "region-info/". $term->name."/";
   }
   elseif (is_numeric($tids[2]))  {
     $term = taxonomy_get_term($tids[2]);
     $newpath = "country-info/". $term->name."/";
   }  
  
  }
}
// Nothing to do:
return $newpath;
}

After using this code, the child terms are not expanding unless I set them in admin/build/menu to be expanded.
So expanding and collapsing off child terms is not working anymore.

greetings,
Martijn

#5

arlinsandbulte - October 31, 2009 - 22:42
Status:active» postponed (maintainer needs more info)

Is this still valid?????

#6

Summit - November 1, 2009 - 08:09

Yes still active, thanks for asking. Greetings, Martijn

 
 

Drupal is a registered trademark of Dries Buytaert.