HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


How to remove a menu link for some categories.

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#70032 (In Topic #14837)
Avatar

Community saint

I've got a "Join" link in a menu block which I would like to only appear for Guests (others are already members). Is there some way to do this? I tried match-keys but that did not work.

Bob
Back to the top
 
Posted
Rating:
#70034
Avatar

Community saint

I think if you tick the "Only display link if there is permission", and in the permissions tree only give guests access to "module:join", it should give you what you want.

Note that admin will see the join link because admin always has permissions to everything.



Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#70035
Avatar

Community saint

I forgot to mention that I tried that.

In the Permissions tree editor, I unchecked all usergroups except Guest for Welcome: Module :join but that did not work.

Bob

EDIT: Where is the "Only display link if there is permission"? I know I've seen it but can't find it now.

Back to the top
 
Posted
Rating:
#70037
Avatar

Community saint

When you edit a menu its in the "Edit selected field" section below the menu item.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#70038
Avatar

Community saint

Thanks, temp, that did the trick.

Oh, and thanks for making me feel stooopid!   :$
Back to the top
 
Posted
Rating:
#70039
Avatar

Community saint

We've all been there. I'm sure I've asked a few 'stooopid' questions.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#70040
Avatar

Community saint

I just feel stupid because I looked in Menu Management but didn't think to click on the link. So near, but….


Last edit: by BobS
Back to the top
 
Posted
Rating:
#70041
Avatar

Community saint

Along the same lines, I have a Logout link in a menu block which does not need to be shown to Guests. In the Site Tree Editor, there is an Entry point: Logout under the Module: Login. However, in the Permissions Tree Editor, it displays only the Module: Login and none of the entry points below it. How can I prevent the Logout link displaying for Guests?

Thanks for your help.

Bob
Back to the top
 
Posted
Rating:
#70050
Avatar

That's not going to be able to work with permissions.
You'd need to put something like this around the MENU_BRANCH_tree.tpl template (assuming it's a tree menu)…

Code

{+START,IF,{$OR,{$NEQ,{PAGE_LINK},:login:logout},{$NOT,{$IS_GUEST}}}}...{+END}

In English: "Only show the menu item ("…" here) if it's not equal to the logout page link OR it you are not a guest".


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: