Search

A new Extension, “Bi-Link Field” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

Ever wanted to link multiple entries from one section to multiple entries in another? Well, now you can using the all new, all fantastic (ha), Bi(-directional)-Link field.

How does it work? Simple, create a section, A, with a Bi-Link field, create another section, B, with another Bi-Link field, only this time choose the Bi-Link field from section A in the 'Options' select.

Just to make things clear, you can only link between two fields, if you try to add another you'll break any existing relations.

The Bi-Link field also has some other advantages over a normal link:

  1. You can configure how the columns are displayed on the publish page, three modes are available; Entry Count, First Item or Last Item.
  2. You can have either the standard list of entries in your output like a normal link, or you can tell it to output all of the entry data, like it was a datasource.
  3. Most importantly, when you create a new entry in section A and link it to entries in section B, those entries in section B will be told that they link to the entry in section A. Not something you can do with a normal link.

Version 1.0.11, 28 April 2009:

  • Issue where output reported 1 linked entries where there where none.
  • Added @id and @handle data to 'items' output mode.
  • Fixed entity escaping issue in 'items' output mode.

Version 1.0.9, 1 April 2009:

  • Added links to column display even when nothing is being linked to.

Version 1.0.8, 25 March 2009:

  • Added a not: method for filtering, so you can exclude entries from the results.

Version 1.0.6, 24 March 2009:

  • Fixed issue where resaving would double the number of links.

Version 1.0.5, 23 March 2009:

  • Initial release, all seems well.

Maybe I'm missing something — is this the same functionality as creating two Select Box Link fields with "allow multiple" checked? If not (I'm guessing there's a subtle difference), could you throw a few scenarios where you'd use a Bi-Link field?

I've updated the topic to include more information on what the Bi-Link can actually do :)

Is there a way to make Bi-Link field like reference link field (http://symphony21.com/forum/discussions/623/1/)?

@buzzomatic: Rowan, this extension is wonderful! Thank you again for creating it! I don’t know why it took me so long to discover it.

@buzzomatic: Quick question, I have my Bi-Link to show column, but the selection doesn’t show up in the column, it just says None. Is it possible to show this field in the column?

I’m using First Item Column Mode for the field named Community and Entry Column Mode for the field named Files. In both instances, the output on the section publish page is None. Is this a bug?

Here’s a screenshot of what I’m talking about… Bi-Link Output on the Publish Page

Any plans to update this for Symphony 2.0.7?

Yeah, I’d like to know as well - I managed to hack around enough to get it to not totally spaz out when changing stuff in the backend, but it would be nice to have it work better. (thanks in advance buzzomatic :D )

We haven’t used this since 2.0.7 was released, so I’ve not had a chance to test it and find out what’s wrong.

Hopefully this week I’ll be able to fix it.

Cheers Rowan, I really love the flexibility over the select box link ;-).

I’ve made some fixes, they are in the unstable branch. Hopefully this makes things better again.

Anyone know how I could filter a datasource with this field? I’m doing it the standard way: {$title} in the filters value box, but it always returns no entries.

Anyone know how I could filter a datasource with this field? I’m doing it the standard way: {$title} in the filters value box, but it always returns no entries.

You need to filter by system ID, or in the case of XML entry/@id. So, unless $title is a numeric system ID of an entry, it won’t work. Typically you would utilize the parameter output (using system ID) of another data source to filter this field.

@buzzomatic, any chance you could add some form of basic deletion rules to this? I’m thinking about using this for associating uploaded files to a entry, and it would be great if when I remove the bi-link relationship from the child object if it deleted itself.

It would also be pretty great if when the parent entry is deleted, the deletion could cascade.

Definitely at some point, but it’s been unstable enough that I wouldn’t would want it deleting data ;)

It would also be pretty great if when the parent entry is deleted, the deletion could cascade.

I think this might be configurable at the relationship level, not the field level. Take a look in the section_associations table and there is an option to cascade deletes. In very early Symphony versions this was on by default, which yielded some very scary moments of complete data removal when you delete one entry high up the chain and realise all other entries were somehow linked to it! It’s now off by default for safety. But perhaps the field itself would allow it to be toggled?

Is there a way to get this working with Symphony 2.1.2? Or is there another way to create a many-to-many-relationship between my entries?

Have you tried Bi-Link in 2.1.2 and does it throw errors?

A Select Box Link can achieve many-to-many relationships if you select the “Allow Multiple” option which turns it into a many. So if you had Articles and Comments sections linked with a SBL in the Comments section, Articles have multiple Comments (by using an SBL), and if you make the SBL a multi-dropdown, Comments can be assigned to many Articles.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details