Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I know, using the default profile, you can see people's favorites on their profile page. However, I'm using panels and APK, and would like to insert the everyone's own favorites into a panel on their own advanced profile page. I thought I had it, but I realized it was only for the logged-in user, so I would see my own favorites on everybody's profile pages.
Is there already a way to do this, and I'm just stupid?
Thanks!
Comments
Comment #1
johlin23 CreditAttribution: johlin23 commentedHey you know what? Turns out I am just stupid. I figured it out through views. Sigh.
Comment #2
mcload CreditAttribution: mcload commentedI am trying to do the same thing. Added "favorite nodes" to profile panel, but it shows only the logged in user's profile. Could you please explain in steps how you did it?
Comment #3
johlin23 CreditAttribution: johlin23 commentedSure!
So, first thing I did was add a new view called "Favorites". I made its view type: Node.
Then I added an argument, and selected "Favorite Nodes: User ID". I didn't change anything in the settings, so I just hit update.
Then, I added a field, and selected "Node: Title". I erased the label, because I wanted just the nodes showing up on the favorites list. I also checked "Link field to this node" so the list acts as a link list.
Then I saved this view.
Next, I went to Panel Pages and edited the User Profile panel page (it should be there from APK, I think.)
I hit the Content Tab, and clicked the add button. There should be a "Favorites: Defaults" option under Views.
In the first drop-down menu, "Favorite Nodes: User ID", I selected the context "User ID". If that isn't t here, then go back to the Context tab and add it as an argument.
Then save, and it should work. Hope that helps!
Comment #4
mcload CreditAttribution: mcload commentedYes, it is working. Thank you very much!