Can we use favourite block in teaser view or views node listing page?

Created on 9 July 2025, 3 days ago

Problem/Motivation

We are using this module in our website, we need to use this heart icon in teaser view and it should be working when multiple heart icons on same page. but it is not working and i didn't find the any options.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

2.0

Component

Documentation

Created by

🇮🇳India rahul_ Alirajpur

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @rahul_
  • 🇨🇦Canada joseph.olstad

    Hi, are you able to please provide some more details?

    What type of a view are you using?

    Can you paste the view yml in question into a code block or upload it here as a ".txt" ?

    I've got this working with views that are based on "content" and also solr index views that have indexed "content".

    Also, what version of Drupal are you using? I've tested this with 10.4.8 however I expect it to also work with 11.2.2 but perhaps need to test that.

    Also, what exactly are you talking about? Your issue could simply be a css issue, it's likely that there are multiple heart icons, are you sure they're not just visually piling on top of each other due to BAD CSS?

    Please also inspect your view html output, paste the html output of the entire view in question.

  • 🇨🇦Canada joseph.olstad
    1. Suggestion #1. Inspect your rendered view html, are you sure you're only seeing "one" heart? Perhaps there are many but you're not visibly seeing them.
    2. Suggestion #2. Please review the css pertaining to #1
    3. If suggestions #1 and #2 suggestions are not helping then please paste your exported view yml in a comment below including theme/twig debug suggestions/comments along with the markup
    4. The view in question, is it a content view, or is it a taxonomy view? Currently the heart supports views that are based on "content" and or could also be a view based on solr indexed "content"
    5. Are you also placing a heart block on the page so a favourite for the current page? This should work also. The whole idea of the heart "block" is to favourite the current page. This is in contrast to the heart field in the view which allows favouriting a line item in the view.

    Enabling theme/twig debug

Production build 0.71.5 2024