I want to check if the page I am on, is gated or not.
$isGatedContent is a Boolean that reflects the fact that the page requested has some gated content, i.e. that requires the user to login.
This is the case for:
Note: This value is based on the page content, and does not change when the user logged in:
Case 1) an already logged user arrives on a Private forum. As the user is logged, the forum is displayed, but $isGatedContent is set to true anyway.
Case 2) a non logged user arrives on a gated page. $isGatedContent is set to true. As unlogged, the user does not see the page / cant access an attachment .
Then the user logs in è the content is displayed (or the pdf is downloaded…), but $isGatedContent is still set to true.
Is it possible to find this info on page load?
Without knowing more, I feel like the easiest thing to do is to use JavaScript to throw a message to the browser console based on the nature of the content.
console.log("Gated content included");
Welcome to the Technology board!
Curious about our platform? Looking to connect on social technology? You've come to the right place!