Jump to content

Additional data for page relations


MrSnoozles
 Share

Recommended Posts

Hi,

I would like to see the possibility to specify additional data when using the page reference field. I've come to need this many times already, but always used some workaround so far.

Examples:

1) Team members with different roles
Imagine there's a template "team" referencing many "user"s.
Now in the team there are different roles, e.g. "coach", "member" and "trial". Right now we would have to add different page reference fields (that are all referencing "user" objects). Having additional data on relations would make this much easier.

2) Join-date for team members
Staying with the team members example, it would be useful to store, when each member joined the team. So far I would not know how to achieve that with the current feature set. Probably by storing some information in a JSON textfield in the team.

 

Edit: this feature request has also been posted here: https://github.com/processwire/processwire-requests/issues/421

Link to comment
Share on other sites

  On 9/27/2021 at 2:11 PM, MrSnoozles said:

Hi,

I would like to see the possibility to specify additional data when using the page reference field. I've come to need this many times already, but always used some workaround so far.

Expand  

Have you already tried using the repeater field for that? https://processwire.com/modules/fieldtype-repeater/

Link to comment
Share on other sites

  On 9/27/2021 at 3:59 PM, kixe said:

I made this post yesterday:

Expand  

This looks like a timing made in heaven. Thank you so so much! Going to try it out right now.

 

  On 9/27/2021 at 4:09 PM, Pixrael said:

Have you already tried using the repeater field for that?

Expand  

Very good idea! That would probably work (having a repeater that repeats a single page select and an additional information field).
However it probably has a few downsides too (especially api wise, but it's also a bit more cumbersome to input, because you don't get feedback which pages have already been referenced).

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...