How to remove /all suffix from taxonomy URLs

chirale - March 30, 2008 - 08:57
Project:Site map
Version:5.x-1.2
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

On _site_map_taxonomy_tree, "/all" suffix on categories forbids URL alias rendering. This results in asymmetry between aliased categories path (on nodes) and category path generated by sitemap.

Here's a patch (on 5.x-1.2 version) to solve this issue. If "all" suffix is detected, taxonomy_term_path($term) is returned instead "/all" suffixed version.

AttachmentSize
catalias.patch605 bytes

#1

chirale - May 18, 2008 - 07:54
Status:active» patch (code needs review)

#2

frjo - July 1, 2008 - 08:29
Title:/all suffix forbids taxonomy URL aliasing» How to remove /all suffix from taxonomy URLs

I guess that you like everyone else that has this problem is using pathauto module and it happens to autogenerate path aliases for taxonomy/term/[id] with out any "/all" or "/0" etc. on the end.

I believe your problem will be solved with entering "-1" for "Categories depth" in the site map settings.

The description for that settings state "Specify how many subcategories should be included on the categorie page. Enter "all" to include all subcategories,"0" to include no subcategories, or "-1" not to append the depth at all."

#3

frjo - July 1, 2008 - 08:31
Category:bug report» support request
Status:patch (code needs review)» fixed

#4

chirale - July 1, 2008 - 14:08

Well, I used a block with this PHP code to return a "flat" category tree with no subcategories.

<?php
print _site_map_taxonomys();
?>

Result (demographic)

Then, I leave the separated sitemap page as is. Result

I want Sitemap page show the entire tree, but when a single category has no subcategories now I have to set that flag to -1 globally? Thanks.

#5

Anonymous (not verified) - July 15, 2008 - 14:12
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.