Selectively hiding Help Center components using Curlybars

Have more questions? Submit a request

36 Comments

  • Jason Fouchier
    Comment actions Permalink

    Hey All,

         I basically followed the same path that Amy Gracer had posted with mixed results. It removes the subject/title, but I am having issues hiding the rest of the data in the row. Does this need to be a JavaScript function, or can it be done in the HTML with the handlebars stuff?

     

    Thanks,

         Jason Fouchier

    0
  • Amy Gracer
    Comment actions Permalink

    Hi Jason,

    What exactly are you trying to do? 

    My code from the requests_page is as follows. Hides any request with a type=task. 

      --Amy

     

    <thead>
    <tr>
    <th>{{t 'subject'}}</th>
    <th>{{t 'id'}}</th>
    <th>
    {{#is current_filter.identifier 'my'}} {{#link 'requests' sort_by='created_at'}}{{t 'created'}}{{/link}} {{else}} {{t 'requester'}}
    {{/is}}
    </th>
    <th>{{#link 'requests' sort_by='updated_at'}}{{t 'last_activity'}}{{/link}}</th>
    <th>
    {{t 'status'}}
    </th>
    {{!--<th>
    Type
    </th>--}}
    </tr>
    </thead>

    <tbody>
    {{#each requests}}
    {{#isnt type "task"}}

    <tr {{#is status 'closed'}} class="request-closed" {{/is}}>
    <td class="request-info requests-table-info">
    <a href="{{url}}" class="striped-list-title" title="{{subject}}">
    {{#if subject}} {{subject}} {{else}} {{excerpt description characters=50}} {{/if}}
    </a>

    <!-- Visible on mobile -->
    <div class="requests-table-meta meta-group">
    <span class="meta-data">#{{id}}</span>
    <span class="meta-data">{{date created_at timeago=true}}</span>
    <span class="status-label status-label-{{status}}" title="{{status_description}}">
    {{status_name}}
    </span>
    </div>
    </td>
    <td>#{{id}}</td>
    <td>
    {{#is ../current_filter.identifier 'my'}} {{date created_at timeago=true}} {{else}} {{requester.name}} {{/is}}
    </td>
    <td>{{date updated_at timeago=true}}</td>
    <td class="requests-table-status">
    <span class="status-label status-label-{{status}}" title="{{status_description}}">
    {{status_name}}
    </span>
    </td>



    </tr>{{/isnt}}
    {{/each}}

    </tbody>
    </table>
    0
  • Jason Fouchier
    Comment actions Permalink

    Hi Amy,

         Thanks for the fast response and code example. It turns out that I had a misplaced </div> tucked away in the code, snug as a bug in a rug. The example you provided helped me find the little culprit, everything is working as intended now. Thanks a million.

     

    Thanks,

         Jason Fouchier

    0
  • Amy Gracer
    Comment actions Permalink

    dastardly <div>s!

     

    Glad you're all set!

    0
  • Niraj Makwana
    Comment actions Permalink

    Can we hide the category so it is doesn't show to signed- in users, but does show to Agents and Managers? 

    it be would be a hidden section for just agents and managers to view and access?

    0
  • Trapta
    Comment actions Permalink

    Hi @Niraj Makwana,

    You can always set the visibility of articles in any section to agents and managers. Once the visibility of all the articles in a section is set to agents and managers, the section will automatically become hidden for end-users and anonymous users.

    The same goes for the category, if the articles of each section in a category are marked to be visible for agents and managers only, the category will automatically become hidden for end-users and anonymous users.

    Let me know if this solves your issue.

    Team Diziana

    0

Please sign in to leave a comment.

Powered by Zendesk