Page 1 of 1
Hide Blocks From Guests
Posted: 15. February 2010 20:06
by AylaAsperger
I was wondering if it is possible in any way to hide certain blocks from guests. I know the blocks containing news and announcement only have content when the user is logged in and has the permission to see the messages, but I would like to see something similar (i.e. hide the block or at least the content of it) for other blocks like Most Posters, New Members, Team, etc. I hope anyone can help me out!
Re: Hide Blocks From Guests
Posted: 19. February 2010 07:18
by Mike
You can make a switch around the block like this:
Code: Select all
<!-- IF S_USER_LOGGED_IN -->
<!-- INCLUDE portal/block/xyz.html -->
<!-- ENDIF -->
Re: Hide Blocks From Guests
Posted: 10. March 2010 16:58
by AylaAsperger
Thank you very much, that ought to do it! Could you please also tell me in which file this has to be done?
Re: Hide Blocks From Guests
Posted: 10. March 2010 17:11
by Marc
You will have to do this in the HTML files portal_left.html, portal_center.html and portal_right.html, depending on where the blocks are being shown.
Re: Hide Blocks From Guests
Posted: 10. March 2010 17:15
by AylaAsperger
Thank you very much! As the blocks were in an IF clause already I updated the existing IF clause with "and S_USER_LOGGED_IN" instead of adding an extra IF clause. And it worked perfectly!