In this video, you will learn how to create a flag that will let the user “favorite” a piece of content so that later, we can display each user’s favorites on their profile for everyone to see.

Create a new flag

  • Go to "Structure => Flags => Add flag" (admin/structure/flags)
  • Select "Nodes"
  • (Continue)
  • Title: Favorites
  • Messages
    • Flag link text: Add to favorites
    • Flag link description: Add this post to your favorites
    • Flagged message: This post has been added to your favorites
    • Unflag link text: Remove from favorites
    • Unflag link description: Remove this post from your favorites
    • Unflagged message: This post has been removed from your favorites
  • Bundles: Article
  • Display Options
    • Display in entity links:
      • Display on Full content view mode
      • Display on Teaser view mode
  • (Save flag)

Now that the flag is configured, let's create a block that will display our list of favorite content