How to present content based on logged in user?

Author Message

Maarten Holland

Thursday 16 March 2006 4:59:12 am

Hi All,

I have some roles eg 'swimmer', 'footballer'. I'm writing some articles on swimming and football. When someone logs in who is a swimmer, I want them to see only articles on swimming. When a footballer logs in, he should see nothing on swimming, but only articles on football.

What's the best way to do this?

I could adjust the article class to contain a checkbox or other attribute to define if the article is on swimming or football. But as far as I know, that way I must do the filtering in template code which I think isn't the right way.

Could anyone point me in the right direction? I'm just setting up the structure so I'm open for all suggestions, it doesn't neccisarily have to be role based.

Your help is highly appreciated!

Cheers,

Maarten

Betsy Gamrat

Thursday 16 March 2006 5:44:23 am

Maarten,

I would simply organize your articles in folders and allow people to navigate through them as they wish.

Some people enjoy football and swimming.

Be sure to post some articles on biking. :)

Daniel Guerrier

Thursday 16 March 2006 7:49:01 am

You can also create you own extension and select the content according to currentUser.
http://pubsvn.ez.no/doxygen-3.5/classeZUserType.html

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.