Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The taxonomy module supports the creation of alternative term creation through hook_term_path, but it is not documented in the APIs. While we're at it, something about how one might update the module field in the vocabulary to allow this feature would be nice too. Creating the links with this feature would seem more intuitive to module designers that the use of hook_link_alter after the fact.
Comment | File | Size | Author |
---|---|---|---|
#7 | 141965-taxonomy_term_path.diff | 675 bytes | jeffschuler |
Comments
Comment #1
Wim LeersHow did you find this out then? I cannot find it in taxonomy.module.
Comment #2
NancyDruIt's in the function taxonomy_term_path:
I had seen it awhile ago, as well as the field in the database, but didn't pay it much attention until I saw it in a forum post the other day. It was one of those "Duh!" moments.
Comment #3
NancyDruComment #4
NancyDruComment #5
webchickMoving to docs queue.
Comment #6
betz CreditAttribution: betz commentedChanged the component to reflect the new component categorization. See http://drupal.org/node/301443
Comment #7
jeffschulertaxonomy_term_path() is documented in code, but the comment is displaced from the function by 1 line of whitespace -- I assume this is why it's not being pulled into the API docs.
This patch just removes the line of whitespace.
Should
hook_term_path()
be added totaxonomy.api.php
? ...and possibly be calledhook_taxonomy_term_path()
for consistency?Comment #8
NancyDruI don't think the name should be changed as this hook can generate paths for any module, not just Taxonomy.
Comment #9
moshe weitzman CreditAttribution: moshe weitzman commentedLong term, I'd like to see us commit #320331: Turn custom_url_rewrite_inbound and custom_url_rewrite_outbound into hooks and then remove this special case hook entirely.
Comment #10
NancyDruThis hook is used in a lot of places, so make sure the upgrade path is clearly documented.
Comment #12
webchickI think testing bot is lying. Marking back to needs review and requesting a re-test.
Comment #13
catchtest bot's happy.
Comment #14
webchickCommitted, thanks! Looks like it needs committing to 6.x and 5.x as well.
Comment #15
Gábor HojtsyCommitted to Drupal 6. Needs commit to Drupal 5.
Comment #16
drummMissed this since it was marked as a feature. Committed to 5.x.
Comment #17
NancyDruThanks