renobird Posted April 2, 2012 Share Posted April 2, 2012 I'm a bit stumped on how to approach this, so I'll just explain what I'm after and hopefully someone can point me in the right direction. I have a files field for my users so they can associate files with their profile. I'm looking for a way to also allow them to categorize or tag those files. My goal is to be able to call these files from the front-end. (i.e. get all files for User1 in CategoryA, or get all files for all users in categoryA). I suspect this is possible with PW, but I can't seem to figure out how. Any direction is much appreciated. Link to comment Share on other sites More sharing options...
apeisa Posted April 2, 2012 Share Posted April 2, 2012 Reno: with the current file field it is not possible to create relation to other pages. If you don't want to dive into building your own fieldtype (allowing multiple files + page references for each file) your option is to keep files in some other branch. Then you would have this kind of setup: user-file template Template has fields user, categories and file User is single page reference for user. Categories is multiple page reference for your categories. File is single file. Link to comment Share on other sites More sharing options...
renobird Posted April 2, 2012 Author Share Posted April 2, 2012 Hi Apeisa, Can you walk me through how it would reference each user? Would I have to manually create a new page for each user in that separate branch? I'll end up with about 200 users roughly, and they will come/go quite frequently. Is there a way to automate the reference? Sorry if this is rudimentary PW stuff. Link to comment Share on other sites More sharing options...
apeisa Posted April 2, 2012 Share Posted April 2, 2012 Hmm.. now that I think of: you can probably add those pages as children for users. Edit user template and allow user-file as children. Then you can remove that user reference, since they are always under correct user. I have never expanded user profiles this way, but I don't believe there are any nasty side-effects for doing so. Link to comment Share on other sites More sharing options...
renobird Posted April 2, 2012 Author Share Posted April 2, 2012 Thanks, I'm going to explore that option now. Link to comment Share on other sites More sharing options...
renobird Posted April 3, 2012 Author Share Posted April 3, 2012 With apeisa's help, I did manage to get this working. I'll post the code soon for anyone else that might need something similar. Link to comment Share on other sites More sharing options...
Marty Walker Posted April 3, 2012 Share Posted April 3, 2012 With apeisa's help, I did manage to get this working. I'll post the code soon for anyone else that might need something similar. Yes please. Were you also working on a front-end form for users to update their profiles? Or did I dream it? Cheers Marty 1 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