Need help with moving 'Submit a Request' into the {{user_info}} menu

Answered

7 Comments

  • Brett - Community Manager

    Hey Jeremy,

    I replied to your other post but reposting below for visibility:

    "Looks like there haven't been any updates to this post. 

    I'm rather limited on what I can assist with on my end, however, I did want to provide some useful documentation for you below:

    If you're still running into any issues setting this up, I'd be happy to get you in touch with our Professional Services team by contacting your Account Executive.

    Keep me posted!"

    I'm also going to leave this post open in case other users would like to jump in and offer up some guidance. 

    Cheers!

    0
  • Jeremy Robinson

    Thanks Brett, I appreciate the follow up. I will be digging more into this and seeing if I can figure out what I am looking to do in the docs. If we are still stumped after that I can follow up with our AE as well to help get the desired end result (if possible).

    Thanks again!

    0
  • Brett - Community Manager

    Happy to help point you in the right direction Jeremy :)

    0
  • Socorro Fernandez

    Hey Jeremy!

    I gave this a go and I believe I was able to figure it out with a script with the default Copenhagen theme.

    This will require going into your theme and copying and pasting this code in your header.hbs and the end of the page after the </header>:

    <script>
    $('a#password-change').after('<a role="menuitem" class="submit-a-request" href="/hc/en-us/requests/new">Open A Support Ticket</a>');
    </script>

     

    Screenshot for reference of where to place the code on header.hbs page:

     

    How it looks like:

     

    This script is manually adding a link code after the change password menu item as I found that the password change link in the menu element name is a#password-change. I also had to add the  role="menuitem" attribute  to the html code we added as I found that is what gave the format. Let me know if you have any questions and if you run into any issues.

    Thank you

    2
  • Jeremy Robinson

    @Socorro you're my hero!! :) This works perfectly for what we were looking to get out of it, and definitely gives me more to work off of while sharpening my JS and Zendesk skills. Thank you for taking a crack at it and making something that we will leverage quite heavily as we continue our use.

    With your help, I did notice that this code snippet can be placed in the script.js file after $(document).ready(function () { and it will give the same desired result. I had to add some padding due to the other CSS modifications we have done, but that was achieved by adding

    style="margin-left: 8px"

    which got things to align properly in the menu.

    Thank you again, I love the willingness of this community to jump in!

     

    UPDATE: Using the below code requires no margin or special modifictions, and takes on the same behavior on hover, etc. as the rest of the menu.

    <script>
    $('a#password-change').after('<a role="menuitem" class="user-nav" href="/hc/en-us/requests/new">Open A Support Ticket</a>');
    </script>
    2
  • Socorro Fernandez

    Hi Jeremy,

    Glad to hear it is working for you and you were able to tune it to your need! Let me know if there are any others you need me to tackle :) Happy Zendesking!

    0
  • Socorro Fernandez

    Thanks for the update Jeremy!

    I would also like to add that you should assign a unique ID to the code. This way you can target it it specifically if required, and you could reference it to add more items to the list in the order you like if applicable. Below is an example of that. Bolded the ID but of course you can name it what you want, as long as it is unique :) :

     

    <script>
    $('a#password-change').after('<a id="customemenu1" role="menuitem" class="user-nav" href="/hc/en-us/requests/new">Open A Support Ticket</a>');
    $('a#customemenu1').after('<a id="customemenu2" role="menuitem" class="user-nav" href="urlhere">Another Menu Item</a>');
    </script>

     

    Thanks again!

    1

Please sign in to leave a comment.

Powered by Zendesk