Frank Vèssia Posted February 12, 2011 Share Posted February 12, 2011 I need to grant access only to a part of a page and hidden to guest another part like a product page with the price visible only to registered users. It's possible to make this? Now i can only menage access to whole page. Link to comment Share on other sites More sharing options...
Jim Yost Posted February 12, 2011 Share Posted February 12, 2011 Hey Sevarf2, I believe you could do something like this: Create a new Role (Access->roles) for "registered_users" and assign it to a user. In your template, I believe you can do something like: <?php if ($user->hasRole("registered_users")) { echo "custom price"; } Link to comment Share on other sites More sharing options...
Frank Vèssia Posted February 12, 2011 Author Share Posted February 12, 2011 maybe i can use $user->hasRole with an if statement and if true show the content... Link to comment Share on other sites More sharing options...
Frank Vèssia Posted February 12, 2011 Author Share Posted February 12, 2011 we replied at the same time... ;D Link to comment Share on other sites More sharing options...
ryan Posted February 12, 2011 Share Posted February 12, 2011 You are both right Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now