-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to show unread messages in PMM block? #34
Comments
Oh i just found out how easy it was to insert the number inside, I just re-wrote it like this:
now it works like a charm. Maybe it could be inside in the module? Minor change but it helps. |
Okay so it looks like proper method should be this: Add this line to template_preprocess_pmm_recent() function in .module file:
And then this to twig file:
But now I am facing a twig caching problem, that new messages only come and are visible when cache is being cleared. Not good. |
I found such a solution for the cache problem I hope it works |
I found this in pmm-recent.html.twig. I think it is a prepare for actually having the number of unread messages in the block.
<span class="pmm-recent__message-count pmm-recent-count"></span>
But it looks like there is a twig variable missing inside. I am not that good in coding so I just pushed the value inside via javascript from official Private Message block rendered elsewhere but it would be very nice to have.
The text was updated successfully, but these errors were encountered: