Set permission to view an item's existence, but not its content
Posted
#3717
(In Topic #741)
My website has a main_news block on the front page, and I've got a news category which consists of private content for a specific usergroup. I've set the category so that guests and members don't have view access, while the proper usergroup does, which works as expected. However, guests and members do not see the entry in the main_news block on the homepage.
I understand that this is expected behavior, as you normally don't want to offer a link to content that someone doesn't have permission to view, but in this case I'd like the restricted links to be visible in order to encourage people to sign up for the usergroup which does have permission. What would be the best way to accomplish this?
Posted
You'd need to alter the code in sources/blocks/main_news.php. Change has_category_access to true || has_category_access at both occurrences.
0 guests and 0 members have recently viewed this.
