Not really sure whether to put this issue in Profile 2 or Path Auto module (so I'm doing both). But when I go to URL Alias -> User path -> Replacement Patterns .... I don't see the fields I added in Profile2.

I want to be able to use the firstname and lastname as the url alias so it goes something like this:

site.com/members/firstnamefield-lastnamefield

where firstnamefield and lastnamefield are all in small caps

Thanks in advance for those who can help.

Comments

dave reid’s picture

clashar’s picture

+1
can't find this functionality too

sslider999’s picture

sub

fago’s picture

Do you have the "Entity tokens" module enabled?

clashar’s picture

Yes I have "Entity tokens" module enabled, but seems I made an error posting here.
I have replacement patterns for special content types, for example: [current-user:profile-main:field-pfj-fname]

But don't see any settings for Profile2 in "admin/config/search/path/patterns"
I would like that Profile page path would be accessible with special path with replacement patterns.
So I should open another issue.

Adam S’s picture

Are there any plans to include pathauto integration with profile2?

MostlyGhostly’s picture

Status: Active » Needs review

Hi there,

I've been puzzling over this for a while and I have found a workaround which suits my needs - and maybe yours. It doesn't require and code hacks or editing at all.

I simply wanted to create a page which listed profiles with a link to them - Profile2 didn't allow this because of the tokens. The trick I figured out is to use a user_id field, hide it - if you wish, but keep it above the field which you want to create as a link. You can then use this id as a pattern (it lists is below). It works perfectly well for me, and hopefully it'll help someone else out. I know it's not an ideal solution, but it works without tearing through the code.

Please let me know how you get on with it - or if I haven't been particularly clear!

Best wishes,

MG

sslider999’s picture

Hello,

On you post you mention

. You can then use this id as a pattern (it lists is below).

.

Should be something attached?

I didn`t understand all of it, can you elaborate?

Thanks

tinto’s picture

Thanks MostlyGhostly for your post, but I don't think your solution has anything to do with this issue. Your simply building a view of a list of links to profiles but this has nothing to do with Pathauto.

What we would like to achieve here is to be able to define patterns in Pathauto using tokens generated by Profile2, so that mydomain.com/firstname-lastname redirects to mydomain.com/users/[userid].

fago’s picture

Status: Needs review » Closed (works as designed)

I don't see a profile2 issue here. If you want automatic url-aliases on profile2, best post a feature-request to pathauto or make use of the url-alias rules action.

grasmash’s picture

You might want to look into the Menu Token module:
http://drupal.org/project/menu_token

Ale.bcn’s picture

hi ppl,

I'm using "Pathauto integration for all Entity Types" from Damien Tournoud which it seems to work as expected. Check it out:

http://drupal.org/node/1330546#comment-5203836

Cheers,

blogers’s picture

Issue summary: View changes

Solution please anything ??¿???????

I find the solution for real names for profile 2 on drupal 7 thanks

here the module https://www.drupal.org/project/pathauto_entity

sandip choudhury’s picture

Yes Pathauto entity works. Thank you.