Jump to content
  • 0

Conditional naviagation-links based on auth fields



1 answer to this question

Recommended Posts

  • 0

Hello TroubleShooter,


You may want to do your links in an HTML DataPage then group your role-specific links in a container. Let me give a concrete example.

<div id="root-links">

<div id="user">
	<a href="#">User Specific Link</a>

<div id="tester">
	<a href="#">Tester Specific Link</a>

<div id="superadmin">
	<a href="#">Superadmin Specific Link</a>



document.querySelectorAll('#root-links div').forEach(function(elem){
	if([@authfield:navId] != elem.id) {
		elem.style.display = "none";



After then, you can formulate a JavaScript code that will hide the group of links not intended not to be seen by the logged-on user.

Hope this helps.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...