AaronSadlerUK / Our.Umbraco.UmbNav

Drag and drop menu editor for Umbraco V8, V9 and V10+
MIT License
10 stars 15 forks source link

Member Visibility isn't working #79

Closed mistyn8 closed 1 year ago

mistyn8 commented 1 year ago

Which exact Umbraco version are you using? For example: 8.7.0 - don't just write v8 or v9

11.4.1

Bug summary

add the Member Visibility options and set up two items, one to hide if logged in the other to hide if logged out.

Both items remain visible in the menu

Specifics

No response

Steps to reproduce

see above

Expected result / actual result

No response

mistyn8 commented 1 year ago

After forking down the repo to investigate... the continue to exit the loop for member visibility is missing adding the item to the removeItems array for later removal..

https://github.com/AaronSadlerUK/Our.Umbraco.UmbNav/blob/develop/src/UmbNav.Core/Services/UmbNavMenuBuilderService.cs#L50-L53

                    if (item.HideLoggedIn && isLoggedIn || item.HideLoggedOut && !isLoggedIn)
                    {
                        removeItems.Add(item);
                        continue;
                    }
mistyn8 commented 1 year ago

PR here - https://github.com/AaronSadlerUK/Our.Umbraco.UmbNav/pull/81

AaronSadlerUK commented 1 year ago

Thanks for this, I will check it out soon!

AaronSadlerUK commented 1 year ago

This is included in V2.0.7 on NuGet