[FEU] check if user is allowed to view this page
Posted: Sat Feb 18, 2012 1:51 am
I'm trying to set up my website with the new Protected Content content-type to protect some pages. Only problem is: some protected pages have a different template than the login form. So the {content} area is not big enough to hold the login form.
So I'm trying to make my template check if the content is protected and the user is allowed to view it.
I tried using {if $ccuser->loggedin()}, but this only partially works because if the user is logged in but is not allowed to view this page, he still gets to see te login form in the {content} area.
So I tried to find a smarty variable that tells me if the user is allowed to view the content, and I found it:
{$content_obj->feu_protected_page->_contentBlocksLoaded:protected}
But, this doesn't work, because the ":protected" part.
Does anybody know an easy way to check this? Maybe with a user defined tag?
So I'm trying to make my template check if the content is protected and the user is allowed to view it.
I tried using {if $ccuser->loggedin()}, but this only partially works because if the user is logged in but is not allowed to view this page, he still gets to see te login form in the {content} area.
So I tried to find a smarty variable that tells me if the user is allowed to view the content, and I found it:
{$content_obj->feu_protected_page->_contentBlocksLoaded:protected}
But, this doesn't work, because the ":protected" part.
Does anybody know an easy way to check this? Maybe with a user defined tag?