I m not sure if this is possible or not but I would like to do the following:
Have groups 1,2,3 and a menu like below
Link 1 (Available to groups 1,2 & 3)
Link 2 (Available to group 1)
Link 3 (Available to groups 1,2 & 3)
Link 4 (Available to groups 2 & 3)
Link 5 (Available to groups 1 & 3)
Yes, what you wrote is certainly possible. The key is all links are available to everyone, but some links won’t work if you are not part of the right group (essentially you’ll be told you don’t have access).
I want to only display a logout menu item when users are logged in. Looking through the Sitelok API, I don’t see a function to determine if the user is logged in.
Sorry just spotted this question. The variable $slpublicaccess is set to true if a user is a visitor and false if they are logged in. So you can use the following to display a logout link only for logged in users.
<?php if (!$slpublicaccess) { ?>
Logout link here
<? } ?>
Sitelok needs to be controlling the page for the variable to be set of course though. You can use the special PUBLIC usergroup on non members pages to allow visitors to see the page and Sitelok to still have control. Contact me via support if you need any help anyway.