Hello,

I'm looking for days to find a way to generate node urls like mysite.org/real-user-name/title-of-the-node ...
I use a a cck content type as a nodeprofile in wich users can set their real-name.
This real-name is used like a charm by pathauto to create user's blog url with the token [userprofile-field_profile_public_name-raw]. And it works perfectly.

But I can't find a way to do the same for Node paths..

The token [field_profile_public_name-raw] does exist for Node path, but it has no effect : i just get a stupid url like my-site.org/%5Bfield_profile_public_name-raw%5D/title-of-the-node. I think it's because the token from a cck field as to be used for the content-type using this field (??)

Also, in the template.tpl.php file, I use some php to replace the default user-name by the value of the nodeprofile field "field_profile_public_name", and it works very good with the Blogger module : the blogger list print the real-username, so I thought Pathauto would do the same if I use the token [author-name-raw] but no ! It get the default username...

I hope I'm clear in my description :)

Any Idea ??

Comments

greggles’s picture

Title: Aliasing node url with realname instead of user-name » Provide nodeprofile tokens in the realm of user tokens
Project: Pathauto » Node Profile
Version: 5.x-2.2 » master
Component: User interface » Code
Category: support » feature

AFAIK this is not currently possible.

I think that this will actually have to be implemented as a feature in the node profile module so I'm reassigning it there.

pacome’s picture

Ok
thanks for putting the post on the right place !
I will try to find another way to do want i want..

fago’s picture

Status: Active » Fixed

I think this module does it: http://drupalmodules.com/module/personalized-e-mails

Anyway this might affect site performance, so I won't include it in nodeprofile itself.

greggles’s picture

Status: Fixed » Postponed

@fago - makes complete sense to me but perhaps postponed would be a better status? If/when someone does the system based on token callbacks and only-build-needed-token replacement then this would be a good idea, right?

fago’s picture

right, thanks greggles :)