0

I just need to know how to key in token replacements for any given users different profiles. In my projects a user can have multiple profiles associated with the account. I am just having problems with tokens on how to locate or recreate those urls.

0

Try like this

  1. First Install Pathauto Module.
  2. Login in drupal as administrator, and goto Configuration. Under 'SEARCH AND METADATA' select 'URL aliases'.
  3. Select 'Pattern' tab and goto 'USER PATHS' and click on 'REPLACEMENT PATTERNS' a list will appear.
  4. Select 'Users' and again some more option will be displayed, select 'name' and the 'pattern for user account page paths should be displayed as '[user:name]' and save it.
  5. In the same window 'Bulk update' tab and check mark the User Paths and click Update.

The following output will be http://example.com/username.

| improve this answer | |
  • The thing is there are more than one profile and I need replacement patterns for either profile based on either the name of the user name or the secondary profile name that is unique. – Sun Rhythms Oct 3 '12 at 20:59
0

Old question, but since it's still unanswered...

This is still a lingering issue in the Profile2 issue queue. As yet, there's no official module that lets you use tokens with Profile2. mohit_rocks answer really only applies to the core profile module AFAIK.

To get custom URLs without token, you can simple create a profile, export it, edit the URL in the export, and then import it.

Details here: https://drupal.org/node/1054740 (response #1) And here: https://drupal.org/node/1149636#comment-5320062

That second thread mentions a sandbox project that " is a quick-and-dirty integration between Pathauto and all the entity types that have an Entity URI." See https://drupal.org/sandbox/damz/1332096

And having written all that up, I just saw there's a similar answer here: Profile2, url rewrite

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.