Selectively hiding Help Center components using Curlybars Follow

Comments

7 comments

  • Avatar
    Ian Maison

    Jake this is great and much appreciated.

    One option that is missing from this is that of hiding an article from the /hc/en-us/categories section. How would this be achieved in terms of an example?

    Thanks.

  • Avatar
    Jake Bantz

    Hi Ian,

    I can provide a quick example in the default Copenhagen theme. To hide an article, the isnt has to go within the article iterator like this:

    That will hide my article 204156349 on the category page, but show all others. Does that help?

  • Avatar
    Ian Maison

    Jake, you are an absolute legend. Well done, it worked and thank you so much.

  • Avatar
    Tess

    This code works for hiding a category.  How do we hide a section?

  • Avatar
    Jake Bantz

    @Ian glad that worked!!

    @Tess do you mean hiding an article on the section page template or are you trying to completely hide a section somewhere?

  • Avatar
    Tess

    Category has 5 sections and I want to hide 1 of them.

  • Avatar
    Jake Bantz

    Hi Tess,

    This is a similar idea to the other solutions, we just need to put the condition around the block which renders each section within the appropriate #each statement. Here is the solution to hide section 200952599 in my account (note the closing isnt right before the else which dictates the behavior for an empty category):

    Hope this is useful for you!

Please sign in to leave a comment.

Powered by Zendesk