Want to hide a Content Area until users are registered
Permalink
I've posted elsewhere about a problem I have with a client who wants to display certain info on a page to all site users but have additional info displayed when the user is registered & logged in.
I was advised to use this code to show the additional content, which someone helpfully gave me but don't have a clue how to implement it:
This is what I want to "hide" inside this area
Can anyone help me. I keep getting fatal errors when I try to just paste it on the line // stuff to show when logged in
I was advised to use this code to show the additional content, which someone helpfully gave me but don't have a clue how to implement it:
<?php $u = new User(); if($u->isRegistered()); { // stuff to show when logged in } ?>
This is what I want to "hide" inside this area
<?php $a = new Area('Event Product'); $a->display($c); ?>
Can anyone help me. I keep getting fatal errors when I try to just paste it on the line // stuff to show when logged in
An easier way would be to enable advances peermissions and then set the permission that only reviewers users, or some other group, can view
How do I do this? I don't know how to set up advanced permissions to show certain areas of a page & not others.
Add this code to config/site.php to enable advanced permissions and Then click on the block that you want to restric access and click permissions. Should allow more control. Also, look here for more infohttp://www.concrete5.org/documentation/how-tos/screencast-how-to-cr...
define('PERMISSIONS_MODEL', 'advanced');
this page talks about em too:
http://www.concrete5.org/documentation/general-topics/simple-permis...
http://www.concrete5.org/documentation/general-topics/simple-permis...