Add new item in navbar dropdown

Hello guys, i want to ask, how can i add new item in navbar dropdown? i already added new item in settings dropdown under navbar settings, but when i refresh the page, it still does’t show up. The hiddent checkbox is not ticked.
Thank you

Hi @Che_Sapik,

I added an item like Issue in the Navbar Settings in Help Dropdown. so please check it.

Output:

Thank You!

Thank you @NCP for the reply, it seems that i need to clear the cache or need to reload the page by clicking the Reload button under the User Account, i thought that by simply refresh the page, it will apply, but unfortunately, it is not.

This can be useful:

Add hook in your custom app → hook.py
app_include_js = “/assets/your_cus_app_name/js/desk/custom_nav_items.js”

And in you custom_nav_items.js use below script to add items as per your requirements:

// Configuration object
const config = {
items: [
{
targetSelector: “.navbar-nav li.dropdown-notifications”,
html: <li class="nav-item dropdown-reload"> <button class="btn-reset nav-link" onclick="frappe.ui.toolbar.clear_cache();"> <span> <svg class="es-icon icon-sm"> <use href="#es-line-reload"></use> </svg> </span> </button> </li>
},
// Add more items here
]
};

$(document).ready(function () {
// Loop through each configured item
config.items.forEach((item) => {
// Find the target element for the current item
const targetElement = $(item.targetSelector);

    // Exit if the target element is not found
    if (targetElement.length === 0) return;

    // Append the item's HTML right after the target element
    targetElement.after(item.html);
});

});