hi, I was just wondering (for CSS/HTML purposses) how the numbers beside the ‘New’ and ‘Unread’ Headings are generated, as when I look in the Inspector, it only shows text, with no indication waht soever of how they got there? Can anyone help me with this? as i recently moved these headings into a bar at the top, and, naterally, they don’t display them any more. Thanks,
So it could be a couple of things. Let’s start with the HTML
Here is the original HTML that is generated when it is in its original bar is
<li id="ember7791" class="ember-view has-icon" title="topics you are currently watching or tracking with unread posts"><a href="/unread"><span class="unread"></span>Unread (2)</a></li>
This assumes that Discourse uses a polling method to update those items. If it is using ember, then this won’t work and you’d have to write something in Ember to make this happen.
yeah, i tried this first, but it didn’t seem to work. I’ll check again though, just in case i typed it in wrong! How do you write something in ember, if this dosn’t work?
Plugin. You’d have to create a template that you load at the top (something I haven’t done before) and give it events that it observes (it’d be a better discussion on Meta than here), but @orodio or @santouras might have some suggestions.