Reputation: 33
I have 2 kinds of users, one for customer and one for affiliate. The thing is i want to show the node(product content type) different on each user. Say I will only want to show limited fields for the customer while in the affiliate i want to show all the fields.
Also I need to put a link to switch in different display.
I research for the view and argument but i think it is not fit in my requirement because I also NEED to have a comment system on each node(product).
Btw, I do have 17000+ products in the site so it is not practical to do 2 nodes for each product.
Let me know your suggestion guys. I'm new to drupal and sorry for my english.
Thank you so much.
Upvotes: 1
Views: 42
Reputation: 415
If you are using Drupal 6 and CCK, enable the "content_permissions" module. Then I think you can create roles for users, and specify which fields users can see. I haven't messed around with Drupal 6 in a while, so I'm not sure about it's default user/permissions functionality. There are tons of modules available that might fit your requirements too.
The "switch view" functionality might take some extra coding though.
Also, Drupal has a "UberCart" module that might do what you're asking, but I've never used that either.
Upvotes: 1
Reputation: 306
You can implement hook_nodeapi and in the load op check the global $user variable. inside this object there is an array of roles (that I suppose differentiate your 2 kind of users) and there you can find which kind of user is watching the node and so adding a special information to the node object that you'll use inside your template to switch between 2 different displays.
Upvotes: 0