Generate unread-class



  • First of all, sorry for my English
    When I try to show the class unread in sub-categories this is what happens ..

    Categories in the tpl file:

    <!-- BEGIN categories -->
    <div class="col-md-1 hidden-sm hidden-xs stats">
      <span class="{../unread-class} human-readable-number" title="{../totalPostCount}">{../totalPostCount}</span><br />
      <small>[[global:posts]]</small>
    </div>
    <!-- END categories -->
    

    Print:

    <div class="col-md-1 hidden-sm hidden-xs stats">
      <span class="unread human-readable-number" title="1">1</span><br>
      <small>Posts</small>
    </div>
    

    Sub-categories in the tpl file:

    <!-- BEGIN children -->
    <div class="col-md-1 hidden-sm hidden-xs stats">
      <span class="{../unread-class} human-readable-number" title="{../totalPostCount}">{../totalPostCount}</span><br />
      <small>[[global:posts]]</small>
    </div>
    <!-- END children -->
    

    Print:

    <div class="col-md-1 hidden-sm hidden-xs stats">
      <span class="{children.unread-class} human-readable-number" title="10">10</span><br>
      <small>Post</small>
    </div>
    

    In this forum the same thing happens.
    Sub-categories:

    Categories:


  • Admin

    Most likely a bug in templates.js, try avoiding {../variable} if you can.


  • Plugin & Theme Dev

    @Gurax the categories API does not return unread-class for sub categories.


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.