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.


Block Visibility Based on User Group

Login / Search

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

Honoured member

This may be a stupid question but here i go. I want to limit the visibility of an entire block based on what user group a member is in. Ex: Guest or member.
 
I know i can limit menu links via permission settings, but I can see no intuitive/straight forward way to do the same with an entire block.
 
Do i have to use zones? And if that is the proper method short instructions of how to achieve it would be wonderful.
Back to the top
 
Posted
Item has a rating of 5 (Liked by Chris GrahamLiked by Fletch)  
Rating:
#92214
Avatar

Community saint

You would do that by adding code around the block. For example, to show a block to guests only you would use:

Code

{+START,IF,{$IS_GUEST}}
   ...Insert block code here
{+END}

And to show it for members only:

Code

{+START,IF,{$NOT,{$IS_GUEST}}}
   ...Insert block code here
{+END}

For more information, see: ocPortal Tutorial: Tempcode programming - ocPortal .

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:
#92215
Avatar

Honoured member

Thanks this is exactly what i needed to know. Will solve my problem perfectly.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: