provide uid pattern for nodes
esllou - March 8, 2007 - 11:02
| Project: | Pathauto |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I am using the Bio module and wanted to use the PathAuto module to create a fixed path to each member's Bio.
The default URL for a user Bio is node/123, node/789, etc, etc.
I have used PathAuto to make this bio/john or bio/philip using the user name in the URL. Is there a way of making the URL bio/1 and bio/2 where the UID is used? I tried to add this manually and the URLs were coming out as bio/[uid] as it wasn't an option for that node type to use uid.
what I ultimately want is to use the Me Module to be able to have the fixed URL for bios as bio/me

#1
Do I understand correctly that you want a pattenr for nodes that provides the uid of the author?
Indeed it looks like this is not currently provided but probably should be. I've changed the title and category to fit with my understanding of the issue.
I think this is reasonable and would be willing to commit a patch that does this. If you can wait long enough I'll even make the patch ;)
#2
Ok thanks. I would appreciate that. I look forward to seeing the patch.
#3
Here's a patch for 5.x
#4
...and one for 4.7.x
#5
Didn't mean to 'steal your thunder' Greggles, but I needed the functionality myself and it was such an easy thing to add... I only tested the 4.7.x version, but the 5.x version is so similar that I don't see how it could not work.
#6
Steal my thunder? Please - stick around and make more patches for pathauto :)
This looks pretty good to me. Can anyone else test it (esllou?) and then I can commit it.
Thanks!
#7
This seems to be working fine.
One other thing I'd like to know how to avoid. I only want to change the bio URLs.
How can I prevent all the other nodes getting altered? The default is [title] so then I changed that, with forum posts for example, to node/[nid] (as they are by default on drupal) and now my URL Aliases list is full of duplicate needless entries:
node/15 -------- node/15
node/21 -------- node/21
etc.
How do I set it up so it doesn't touch anything but Bios? Is it the bulk update option that I shouldn't be using? My thoughts are that even if I don't choose bulk update, all future forum posts will still generate that duplicate entry in the URL Aliases table.
#8
esllou - thanks for the review.
Please note:
So, yeah, separate support issue for that latest idea, please.
#9
committed to the 5--2 and 4.7 branches. Thanks ahoeben!
#10
Is there a reason to not commit this to the DRUPAL-5 branch?
Especially if the plan for 5.2 is to integrate with the token-module?
I just created the exact same patch for myself before I found this issue ...
#11
That's probably a good point...I applied it to that branch and it should be in the 1.x-dev tarball by tomorrow and then assuming that goes well for a while I'll make a 1.2 version (which includes a translation fix as well...)
Thanks!
#12