Download & Extend

taxonomy depth support

Project:Drupal core
Version:7.x-dev
Component:taxonomy.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Hi, I would like to have a higher depth in my taxonomy tree. So the breadcrumbs links to taxonomy/term/tid/depth ... for my purpose I just changed the line

          $breadcrumb[] = l($p->name, "taxonomy/term/$p->tid");
to

          $breadcrumb[] = l($p->name, "taxonomy/term/$p->tid/9");

so it has a depth of 9... more than I need to as much as I'll ever need. This was just my fix for myself, but implementing it as a setting doesn't seem to difficult. I don't know if it would involve more than this. I guess the sub-term links also need to include depth for it to work well. I'm also not sure how this would effect the ability of pathauto module to work properly. I haven't had much to time to look into the code an figure out how to implement this, but if or when I do, I'll try to figure out how to contribute a patch if anyone thinks its a good idea.

Comments

#1

Project:Taxonomy context» Drupal core
Version:4.6.x-1.x-dev» x.y.z
Component:Miscellaneous» taxonomy.module

I also would like to set the standard-depth somehow.

With 'standard-depth' I mean the depth that is applied on taxonomy/term/tid.

This is currently zero (taxonomy/term/tid/0), but sometimes you want it e.g. to be infinite.

#2

e.g. I could change

<?php
function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page')
?>

to

<?php
function taxonomy_term_page($str_tids = '', $depth = 9, $op = 'page')
?>

to achieve what I want.

But I just don't understand how Drupal can call its taxonomy system "mature" if such elementary things can't be configured (whithout changing the code).

#3

I would just be happy for the default depth to be 'all' instead of 0. While I'm sure there must be some argument for using 0, I don't see it as being very useful.

There are other people interested in this as well, see here:
http://drupal.org/node/41349

My suggestion is:
from:
function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
to:
function taxonomy_term_page($str_tids = '', $depth = 'all', $op = 'page') {

thoughts anyone?

#4

Version:x.y.z» 7.x-dev

#5

Status:active» closed (won't fix)

We removed depth argument handling from core listings, you can do this with views now.

nobody click here