Can Content Profile module help filter data based on current user? How?

First I tried this with taxonomy, and now I'tried to solve my problem with te Content Profile module.
I'm wondering if it is the right choice, because I can't get it to work.

This is what I want:
Users can go to my website and download documents , these documents are related to projects.
I want the users to see only the documents of the project that they are related to.

To achieve this, I installed Modules CCK and Content_Profile.
Then I set this up:
- projectdocuments have a node reference field to project
- user_profiles have a node reference field to project

Next thing is to make a view. I have tried every tutorial I could find, but I can't get it to work.
Has anyone done this before using the Content Profile module?
I've been trying for a week now and becoming al little desperate....

Thanks

Ellis

Login to post comments

Mmmmm, maybe using organic groups

jackbravo's picture
jackbravo - Tue, 2009-06-02 16:37

What you are trying to do seems like an ideal match for using the organic groups module (og). Organic groups receive subscriptions from users and you can make groups private so users can only see posts from groups they belong to.

You could do it with content profiles, node references and views..... but seems like a more complicated solution.


I've done something similar to this

FilmKnurd's picture
FilmKnurd - Thu, 2009-07-23 14:16

I don't know if this helps, but I did something very similar to what you are trying to do. I think the difference is that your project might need to reference a document.

My Setup:
Profile --> Product
Product --> Manual

The View:
-= Filters =-
Node: Published
Node: Type = Profile

-= Relationships =-
Content: Product (field in profile)
(Product) Content: Manuals (Uses previous relationship, and the manual field in product)

-= Arguments =-
User: UID
Do not use a relationship
Provide a default argument --> User ID from logged in user

-= Fields =-
(Manuals) Node: Title (uses Manuals relationship defined above)

This will display the titles of manuals that match the product in the user's profile.

Ok, the key here is that the content type filtered is the profile and the referenced type (manuals associated with product) is imported in via a relationship. I don't bother to display anything from the profile. Just the title of the manual imported from the relationship. This only works, however, because the product content type (referenced by the profile) references the manual.


potential alternative

idcm@drupal.org - Sat, 2009-08-01 17:53

Ellis, I was searching for info on content_profile and your challenge seems similar to mine. Did you resolve your challenge? It has been a while since you posted so I assume yes. Would you like to share what you did?

I am going to explore FilmKnurd's suggestion as well as a process Jess uses. I documented her process on my blog at http://idcminnovations.com/article/drupal-pages-and-views-cck-computed-f... if it helps anyone who stumbles by here.


Broken link

FilmKnurd's picture
FilmKnurd - Mon, 2009-08-03 20:50

The link to Jess doesn't work.


Me wonders...

FilmKnurd's picture
FilmKnurd - Mon, 2009-08-03 20:54

I started reading your documentation and I wondered.... Is this what the Views Attach module does?