[drupal-devel] [feature] support for path alias chains in
drupal_get_path_alias.
jvandyk
drupal-devel at drupal.org
Sat Aug 20 22:33:38 UTC 2005
Issue status update for
http://drupal.org/node/21239
Post a follow up:
http://drupal.org/project/comments/add/21239
Project: Drupal
Version: 4.6.0
Component: base system
Category: feature requests
Priority: normal
Assigned to: Anonymous
Reported by: aws
Updated by: jvandyk
-Status: closed
+Status: patch (code needs review)
Or not. My eyes seem to be crossed from too much "patch bingo".
This has been rewritten in 4.7, however.
jvandyk
Previous comments:
------------------------------------------------------------------------
Sun, 24 Apr 2005 22:20:01 +0000 : aws
Attachment: http://drupal.org/files/issues/includes_bootstrap.inc_0.patch (739 bytes)
This is a small patch for function drupal_get_path_alias in
bootstrap.inc.
This allows a path to have a non-cyclic chain of aliases, and enables
the path alias finder to walk up the chain to the top level alias.
For example:
taxonomy_menu/4/1/50 | topics/whats_new/events
taxonomy/term/50 | taxonomy_menu/4/1/50
Now I can have all references to taxonomy/term/50 automatically point
to the top-level alias, topics/whats_new/events.
I am also posting a patch against Pathauto module which creates these
multi-links automatically for categories when taxonomy_menu is present.
(I will add followup with a link to that patch).
Note that the inverse case (alias => path) is *not* necessary (in fact
it would break the intention of this patch...
---
There are several other ways to accomplish this; all of which are more
involved. YMMV. I won't be insulted if this patch is rejected. :)
An alternative solution would be to allow the destination column to
accept non-unique entries. This would also require some sort of
weighting otherwise the final resolution would be indefinate.
A second alternative would be to have drupal generate taxonomy links in
a more general manner, so that the taxonomy_menu module could change all
the taxonomy links via the proper hooks.
A *third* alternative would be to fix the menu system so that it does
not require nested paths in the hiearchy, this way taxonomy_menu would
not need to create its own paths.
------------------------------------------------------------------------
Sun, 24 Apr 2005 22:24:05 +0000 : aws
Attachment: http://drupal.org/files/issues/includes_bootstrap.inc_1.patch (739 bytes)
Sorry, I ran that diff in the wrong direction... use this patch instead.
------------------------------------------------------------------------
Sun, 24 Apr 2005 22:31:16 +0000 : aws
Here is the associated patch to pathauto:
http://drupal.org/node/21241
------------------------------------------------------------------------
Thu, 05 May 2005 01:20:06 +0000 : mikeryan
+1
I'd like to see the chain followed as well, so when an alias is
replaced a "forwarding address" can be left.
------------------------------------------------------------------------
Sat, 20 Aug 2005 22:27:55 +0000 : jvandyk
This seems to have made it into 4.6 already.
More information about the drupal-devel
mailing list