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,
Calling in @cpradio since this is more of a Discourse question.
Link please As I have know idea what you mean by “moved these headings into a bar at the top”.
just visit my website: http://fantasia.org.uk
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>
Your top bar has:
<li><a class="nav-link" href="http://fantasia.org.uk/unread">Unread</a></li>
So I’d start by trying to make the two more similar. Maybe try (notice the added span tag)
<li><a class="nav-link" href="/unread"><span class="unread"></span>Unread</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.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.