Jump to content

New module: List Links - associate list items 1:1


BitPoet
 Share

Recommended Posts

FieldtypeListLinks

If somehow found myself needing a means to associate items between two lists, and pages this time weren't the answer. So I started to develop this little Fieldtype/Inputfield. It lets you define two lists (let's call them "left" and "right") and declare a mapping between those.

1. Create your field and add options for the "left" and "right" select:

listlinks1.thumb.png.8738a02d6d2409a7d121086c9a8dc410.png

2. Set your labels and how many items it should show:

listlinks2.thumb.png.46d82716cbd3678b935ecf443880f6d8.png
 

3. Edit your page and assign items:

listlinks3.thumb.png.ec6263fa4d82eb37471baacaffcfbe52.png

 

The module is still very much experimental and the API subject to change. However, I wanted to share what I have and maybe get some ideas and feedback before things get wired too tightly.

The module and a little more documentation can be found in its GitHub repo.

 

  • Like 3
Link to comment
Share on other sites

33 minutes ago, Ivan Gretsky said:

Looks cool @BitPoet!

Could you describe uses cases for this so we know when we can use it?

Thank you! The current use case is pretty technical, though I can't go too much into details. You could call it a visual data mapping helper. I'm filling the options dynamically through a hook, with the options depending on other settings in the pages. But I'm open for more ideas how to use it.

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...