Redirect homepage to My Activities page upon login.

Answered

2 Comments

  • Socorro Fernandez

    Hi Amie,

    I believe I was able to get a script to work as you described but I ended up placing the following code at the very end of home_page.hbs :

    <script>
    $(document).ready(function() {
    if ((HelpCenter.user.role=="end_user")||(HelpCenter.user.role=="anonymous")) {
    $(window.location.replace("https://YOURDOMAINHERE.zendesk.com/hc/requests"));
    }
    });
    </script>

    I originally put this is script in the JS file but it continued to reload the page since I didnt have another condition to compare the current page and to not run the script. I decide to put the above code on the home_page.hbs which fixed the issue since it will only run if a user goes to the homepage.

    Please let me know if you have any questions or if you run into anything with this.

    Thanks!

    0
  • Sushant Awalekar

    Hi Amie,

    I have tested the same code snippet in my helpcenter and its working as expected.So Can you provide more details on where you have added this code in script.js ? 

    0

Please sign in to leave a comment.

Powered by Zendesk