Jump to content

PagefieldPairs - Synchronize Pagefields between two different Pages


bernhard
 Share

Recommended Posts

This module comes in handy when you need related pagefields that are dependant on each other.

Example: you have a sports team and team members belonging to that team. you need 2 fields: one on the team-page, one on the member-profile. this module keeps both fields in synch. Other examples would be hierarchical company structure or any other kind of membership relation.

Demo:

settings in this example:

2016-11-14 16_28_33-Modules • ProcessWire • hrdiamonds.dev.png

 

Gitlab: https://gitlab.com/baumrock/PagefieldPairs

Modules Directory: asap

only tested on PW3 and reno theme. Please test it faithfully before using it. please report any issues :)

  • Like 7
Link to comment
Share on other sites

Hi @bernhard,

Nothing wrong with having two similar modules out there. I'm always looking at other people's module code because it helps me learn, and I expect others are the same. The more modules, the more to learn from! :)

I noticed your module has the same oversight that I just fixed in mine: a Page field doesn't necessarily return a PageArray (i.e. 'single' Page fields) so methods like has(), add() and remove() won't work in all cases.

 

Link to comment
Share on other sites

5 hours ago, Robin S said:

Nothing wrong with having two similar modules out there. I'm always looking at other people's module code because it helps me learn, and I expect others are the same. The more modules, the more to learn from!

While that's true it's always a bit harder for the user as he has to decide which one to take. 

  • Like 2
Link to comment
Share on other sites

3 hours ago, LostKobrakai said:

he has to decide which one to take

Not to mention that if you unite forces everyone wins, especially with such a much needed module. So I suggest Robin S leading the development with Bernhard posting lot's of pull requests ;) 

  • Like 1
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

×
×
  • Create New...