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

greggles - March 8, 2007 - 17:46
Title:Creating fixed URL for User Bios» provide uid pattern for nodes
Category:support request» feature request

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

esllou - March 9, 2007 - 08:15

Ok thanks. I would appreciate that. I look forward to seeing the patch.

#3

ahoeben - March 12, 2007 - 11:12
Status:active» needs review

Here's a patch for 5.x

AttachmentSize
pathauto_node_uid_5x.patch 1.1 KB

#4

ahoeben - March 12, 2007 - 11:13

...and one for 4.7.x

AttachmentSize
pathauto_node_uid_47x.patch 1.1 KB

#5

ahoeben - March 12, 2007 - 11:21

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

greggles - March 12, 2007 - 14:00

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

esllou - March 12, 2007 - 22:36

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

greggles - March 12, 2007 - 22:47

esllou - thanks for the review.

Please note:

When you open and respond to issues please open one issue for each problem/request don't bundle several issues into one submission.

So, yeah, separate support issue for that latest idea, please.

#9

greggles - March 20, 2007 - 03:07
Status:needs review» fixed

committed to the 5--2 and 4.7 branches. Thanks ahoeben!

#10

ray007 - March 27, 2007 - 09:43
Version:5.x-1.x-dev» 5.x-1.1

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

greggles - March 27, 2007 - 16:52

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

Anonymous - April 10, 2007 - 17:01
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.