Hi,
I currently have both Profile2 and Views installed. I've been trying to get a listing of users with links to their Profile2 page. This way, I can have a page where admin users can view and edit those profile pages. However, there doesn't seem to be that relationship in Views. How would I get this listing? I've looked all over and no answers. Can someone please help? Thanks!
Comments
Comment #1
aquariumtap commentedsubscribe
Comment #2
smiletrl commentedI'm using version beta4.
Currently I'm using users' picture linked to the profile page. If you have added an image field to profile2, you'll find a configuration "image link to" when you configure this image field.And this selecting list contains three options:nothing,content and file.I select the option "content", and this image in views will link to the users profile page.
On the other hand, if you want to add this profile page link to any other fields text in views, you can use the REWRITE RESULTS configuration. Check "Output this field as a link" under rewriting results and give the link path below.But I haven't figured it out how to dynamically provide the profile page link to corresponding users.
May this will help.
Comment #3
shadowdknight commentedI cant find such option in 7.x.1.
Thanks
Comment #4
shadowdknight commentedSorry, it seems you meant those are options in View
Comment #5
smiletrl commentedYou may check it here http://drupal.org/node/1074296
Comment #6
aniebel commentedNot sure if this helps: http://drupal.org/node/1334074
Comment #7
kevinquillen commentedHow do you utilize the alias of a Profile2 entity instead of the user alias on the User entity? I want to use the Profile2 alias for better SEO, the token options I have for that are not available on the User entity for aliasing under Pathauto.
Comment #8
aufumy commentedI was able to use pathauto for profile 2, when enabling the sandbox pathauto entity module and the entity tokens module.
Comment #9
Oceanman commented@Kevinquillen I was able to alias my profiles using rules to set the url. This was helpful because I could have different sets of tokens for different profile types. I did not use Pathauto.
Regarding your quest for better SEO, how do you set your HTML metatags in the header for your profiles? Any viable solution would be welcome, this is my issue regarding metatags in profiles:
http://drupal.org/node/1621328
Comment #10
kevinquillen commentedMetatags are one thing, aliases are another... I settled on static/users/fname-lname
Comment #11
oystercrackher commented@oceanman
Can you please advise what type of trigger, condition, and action you placed in your rule to create url aliases for profile2?
I have tried "AFTER SAVING NEW PROFILE" with
{ "rules_create_url_alias_for_an_indiv_profile_using_profile2_2" : {
"LABEL" : "Create URL alias for an individual profile using profile2 #2",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "path", "profile2" ],
"ON" : [ "profile2_insert" ],
"IF" : [
{ "entity_is_of_type" : { "entity" : [ "profile2:user:profile-main" ], "type" : "profile2" } }
],
"DO" : [
{ "drupal_message" : { "message" : "Creating alias of community\/members\/[profile2:user]\/profile for [profile2:url] FROM PROFILE" } },
{ "path_alias" : {
"source" : "[profile2:url]\r\n",
"alias" : "community\/members\/[profile2:user]\/profile",
"language" : [ "" ]
}
}
]
}
}
I also tried "AFTER SAVING NEW USER ACCOUNT" with
{ "rules_create_url_alias_for_an_individual_profile_using_profile2" : {
"LABEL" : "Create URL alias for an individual profile using profile2",
"PLUGIN" : "reaction rule",
"ACTIVE" : false,
"REQUIRES" : [ "rules", "path" ],
"ON" : [ "user_insert" ],
"IF" : [
{ "user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "6" : "6" } } } }
],
"DO" : [
{ "drupal_message" : { "message" : "Creating alias of community\/members\/[account:name]\/profile for [account:profile-main] FROM ACCOUNT" } },
{ "path_alias" : {
"source" : "[account:profile-main]\r\n",
"alias" : "community\/members\/[account:name]\/profile",
"language" : [ "" ]
}
}
]
}
}
I am using profile2 registration path module in addition to profile2. Neither one seems to work in creating aliases.
Looking forward to your reply.
Thanks
Melissa