Navigation Permissions



  • With the navigation items, you can set to logged in users, admins, etc but you cant select display only to guests.

    have a donate page for access to the forum, but i only want it shown to guests, not logged in users. and no option for that exists.


  • Admin

    You can probably use the following until that option is built, place it in your custom js section.

    $(window).on('action:ajaxify.end', function() {
        $('#main-nav a[href="/donate"]').parent().toggleClass('hidden', !!app.uid);
    });
    

    This will hide the /donate navigation item for logged in users but show it for guests.



  • thanks i will give it a whirl


  • Admin

    Instead of app.uid you need to use app.user.uid


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.