Show different content in header based on page


  • Carsten Falborg
    Community Moderator

    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...

  • Trapta
    Community Moderator

    Hi @Chris,

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

    Team Diziana

  • John Witt

    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:

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

    <footer CSS code>


    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.



  • Owen


    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}}



Post is closed for comments.

Powered by Zendesk