I'm building a Community implementation and attempting to stick to OOTB functionality as far as is possible. I'd like to assign certain pages to certain audiences.

Is there any way for navigation bars to take into account the audience(s) of the context user and conditionally show/hide items on the navigation bar. This is what I've tried so far:

  • This doesn't happen automatically using a standard theme and nav bar component
  • This doesn't happen automatically using a custom theme (forceCommunity:themeLayout) and the "{!v.navBar}" property
  • Using "forceCommunity:navigationMenuBase" and investigating the properties in the returned "menuItems" property

Does anybody know if there are objects that can be queried to understand:

  • The context audiences for the user
  • The audiences assigned to pages
  • The pages assigned to Navigation bars

And combine these to dynamically return the correct items? I know I have workarounds if necessary (e.g. build different nav bars for different audiences and display those), but would love to avoid duplication if I can. Plus this is a fun technical challenge :)



You must log in to answer this question.

Browse other questions tagged .