Show different content in header based on page

4 Comments

  • Carsten Falborg
    Comment actions Permalink

    Hi Chris,

    You can't natively in Zendesk Guide, so you would have to create a javascript that shows/hides based on URL. Unfortunately i am not a programmer, so I can't guide you on how to do that...

    0
  • Trapta
    Comment actions Permalink

    Hi @Chris,

    You can refer to this post to create something like this. Let me know if this solves the issue.

    Team Diziana

    -1
  • John Witt
    Comment actions Permalink

    Hello Carsten,

    The code itself is simple - here is mine to not display the Footer on the new_request page since it is the contact us page:

    <script>
    var currentLocation = window.location.pathname;
    if (currentLocation != "/hc/en-us/requests/new") {

    <footer CSS code>

    }
    </script>

    The problem is the Copenhagen them CSS code doesn't play well with the JS code, and i can't seem to get the script to run correctly inside the CSS code(works fine outside). I cut a ticket to Support and if they have a solution I will post it here.

    John

     

    0
  • Owen
    Comment actions Permalink

    Hello,

    It would be awesome if you could add this to conditionals/helpers.

    I was trying to do exactly the same thing as OP, in header.hbs:

    {{#unless current_page 'home'}} 
    {{search submit=false instant = true}}
    {{/unless}}

    Thanks!

    0

Please sign in to leave a comment.

Powered by Zendesk