• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » Communication » uCoz Discussions » Site menu Security
Site menu Security
Boujohn
Posts: 36
Reputation: 0

Message # 1 | 1:46 PM
Is there any way to deactivate and/or remove visibility from menu items?

Either tied to visibility of the target page, or explicitly set.

We don't want public users to be able to see the site menu if they do not have access to the targets.

Thanks. John
Sunny
Posts: 9296
Reputation: 456

Message # 2 | 2:39 PM
Boujohn, do you want to hide all items or just some of them? And what's the URL of your website?
I'm not active on the forum anymore. Please contact other forum staff.
Boujohn
Posts: 36
Reputation: 0

Message # 3 | 2:59 PM
tdua.ucoz.com

Ideally per menu item/node ... but for right now if we can hide the entire menu that would be very helpful.

We would want to prevent "Users" role from seeing the menu, and will allow "Checked" or "Friends" or some other role we create, to be a requirement in order to allow access to them menu.

Thanks. John
Sunny
Posts: 9296
Reputation: 456

Message # 4 | 10:31 AM
Boujohn, this can be done with conditional operators: http://forum.ucoz.com/forum/37-471-1
For example, in your case it can be something like

Code
<?if($GROUP_ID$=3 or $GROUP_ID$=4)?> site menu code here, e.g. $SMENU_1$ or $NMENU_1$ <?endif?>


You can add more group IDs, 3 and 4 are the IDs if the default Administrators and Moderators groups.

I'm not active on the forum anymore. Please contact other forum staff.
Boujohn
Posts: 36
Reputation: 0

Message # 5 | 4:58 PM
Seems simple enough. However not sure where it should go.

Looking at the "Site Pages" template, it look like the macro $GLOBAL_AHEADER$ renders the top header and the site menu.

Is there documentation somewhere that describes how all of these macros are defined, and if there is underlying code that can be modified? Otherwise it's a series of black boxes with hidden dependencies and hierarchies which is very time consuming to pick apart.

What would be better yet is additional UI controls. Are these things on the enhancement request list for the system? I'm sure they would be heavily used and highly appreciated features smile

Thanks. John
Xayaan
Posts: 558
Reputation: 13

Message # 6 | 5:25 PM
Boujohn, Please refer the sticky threads here for more information regarding design customization of uCoz website. As for the Global blocks, Here is a tutorial on it and some FAQs that would help you get started and using the global blocks.

As for the feature request list, You can suggest ways to improve uCoz here. Your suggestion is highly valuable to us. smile

My Skype : xayan123 | My Twitter : @Officialxayaan
uID : - Zayaan Ibrahim | Need a professional design? Check out my Portfolio
Boujohn
Posts: 36
Reputation: 0

Message # 7 | 10:22 PM
Okay, so "Top Part of the Website" is the same as $GLOBAL_AHEADER$ ... I wouldn't have known that. Now I'm understanding it a bit better. If the names were more simllar it would make it a bit easier.

i think I know how to deal with this now.

Thanks. John

Added (2015-04-23, 10:22 PM)
---------------------------------------------
Fyi, successfully implemented in "Top part of the website" template:

<!-- <sblock_nmenu> -->
<?if($USER_LOGGED_IN$)?>
<?if($GROUP_ID$=1)?>
<?else?>
<?if($NMENU_1$)?><!-- <bc> -->$NMENU_1$<!-- </bc> --><?endif?>
<?endif?>
<?endif?>
<!-- </sblock_nmenu> -->

Users can now only see the menu after registering AND after we move them to a different group other than Users. The funky nested logic is due to the apparent lack of a != operator.
Post edited by Boujohn - Thursday, 2015-04-23, 10:23 PM
uCoz Community » Communication » uCoz Discussions » Site menu Security
  • Page 1 of 1
  • 1
Search: