Frank Vèssia Posted February 12, 2011 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.
Jim Yost Posted February 12, 2011 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"; }
Frank Vèssia Posted February 12, 2011 Author Posted February 12, 2011 maybe i can use $user->hasRole with an if statement and if true show the content...
Frank Vèssia Posted February 12, 2011 Author Posted February 12, 2011 we replied at the same time... ;D
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