This is a hacked pathauto.module and pathauto_taxonomy.inc which adds /all to the alias source path in order to display nodes of sub-categories from a parent node which is logical and expected on a hierarchical site. It is very rough and needs a configuration option on the categories tab, I just had a look at how to do this but I don't have the time at the moment and pathauto is pretty complex... I hope that this makes it into the release as I believe it is important. I have an alias based vocab menu module I will be releasing shortly which relies on this for it to function correctly.

I hope that someone who knows how to add settings to pathauto will have a go or at least give me a direction to go in.

The changes to taxonomy.inc are simply to add the '/all' I have used a $hierarchy variable and if statement in preperation for a checkbox.

The edit to pathouto.module is a line that removes the '/all' before creating a feed link.

Sorry they're not patches, I'm not too familiar with them at the moment.

It struck me that another way to go with it would be to create an extra alias in the way that feed is extra, this would mean only taxonomy.inc would need changing and may suit some people to have both, I did it this way because I have no use for the standard category aliases.

http://www.neuworldorder.com/projects/pathauto_hierarchy_hack_01.zip

Andy

CommentFileSizeAuthor
#2 pathauto_taxonomy.inc_.txt609 bytesAstralP
#1 pathauto.module_0.txt126 bytesAstralP

Comments

AstralP’s picture

StatusFileSize
new126 bytes

Greggles here is the diff for pathauto.module

AstralP’s picture

StatusFileSize
new609 bytes

Here is the diff for pathauto_taxonomy.inc

One thing which is an issue I've noticed is that it seems you have to clear your aliases and regenerate them all for all the new aliases to take hold. I must have missed something somewhere.

greggles’s picture

Status: Active » Needs review

So, I'm not sure how I feel about this. I'd like to get input from everyone else before worrying about reviewing it and committing it.

Either way - thanks AstralP for submitting this idea and for providing the patch! However, the patch is in the wrong format: use diff -up to get the right format and also you should be able to get both in the same file if you do it at the right level ( http://drupal.org/diffandpatch ).

greggles’s picture

Astralp - perhaps you can repeat your comment from the other issue over in this one :) It's best to keep the conversation on a single track for clarity of other users.

My basic motivation for not just applying this right away is that it is a change in the functionality of the module and whenever there is a change I want to make sure that it's warranted and that it's not a surprise for users of the module.

AstralP’s picture

Status: Needs review » Postponed

I think it is best to forget this for now as the views module can be used to provide the display. Besides that I think it is more important that the current functionality is fine tuned. If I do attempt it again I think it would probably be best as an additional alias through a module.

greggles’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Postponed » Closed (won't fix)

Moving branch so we can keep track of it and changing status so it won't show up in the active list.