Search

A new Extension, “Select Box 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.

A replacement field for the Section Link field of Symphony 2 Rev 5

Works in a near identical way to the standard select box field, however there is no static option and entries are linked internally via their ID, meaning that if an entry is changed, any Select Box Link fields will not lose their link to that entry. The data on the front-end is presented in a way identical to that of a Section Link.

CHANGE LOG

1.4

  • Enable Data Source param output for this field

1.3

  • Fixed bug introduced in 1.2 that caused table values to disappear if the first field of the section is a "Select Box Link".

1.2

  • Should correctly work with fields that do now use a 'value' column in the database. This would cause an empty select box.

1.1

  • Added ability to set field to required/not required.
  • Added multi-select property (thanks to czheng)

Thank you! Out of curiosity, will an extension such as this be the way to do such linking in RC1?

@ashooner: Pretty much. Although in RC1, it's easiest to link sections with the ordinary select box or tag list field. There are also intra-section-multipliers, which reduce the need to use section links in many cases - e.g., if you wanted to have an arbitrary number of images with each "Articles" entry, you could do this inline in the Articles section, by making a subset of its fields duplicatable. We'll try to get a demo of this out asap!

Neat-o!

FYI: the direct download does not work

FYI: the direct download does not work

Looks like a Github problem.

I would love to have an extension like this in Symphony 1.7... Is there a ghost of a chance?

Thanks, Alistair. This is a really useful addition.

Just wondering if would make sense/be possible to have there be a null value for it, that way you can use this as a flag for associations that aren't required.

Also, not very important, but thought you should know that it sorts alphabetically descending (on line #147) at the moment which is the opposite to the usual default in Symphony.

I would love to have an extension like this in Symphony 1.7... Is there a ghost of a chance?

Unfortunately it's not really possible since there is a set number of fields and they are heavily integrated into Symphony's core code.

Just wondering if would make sense/be possible to have there be a null value for it,

Funnily enough I was going to do that today.

thought you should know that it sorts alphabetically descending (on line #147)

Ah, I will correct this. Thanks for noting.

Awesome. Thanks again, Alistair.

If this is truly a replacement for section link, then in addition to the NULL value, and the ability to make instances of the field multi-select-enabled (which is in the works), it would be nice to enable multi-select on the field itself so that when adding it to a section users can link that section to more than one 'parent' section, much like the way section link works now.

To clarify:

There is the question of how the field works when creating entries in a section (the Publish panel), and then how the field works when being added to the section itself (the settings Panel). It would be great if multi-select were enabled in both, so that a) single entries could be linked to more than one parent entry, and b) fields could be linked to more than one parent field.

Does that make sense?

@czheng: I absolutely agree that multi-selection would be very useful here, but I have a question for you:

If we just implemented (a) but not (b), would that suffice? Couldn't you use several multi-selectable fields, one for each section, instead of a single multi-selectable field with all options combined?

This would require N data sources instead of 1 (where N = the number of select box link fields), so it might not be ideal, but we could always implement (a) first, and then (b) later if we find that omission to be a hassle.

I've already got (a) pretty much working, and I sent the code in to be reviewed by Alistair since it's probably not the cleanest or most efficient code ever ;)

As for (b), you're right, it's a question of serviceable vs ideal. Of course, if I have a section called Attachments, entries in which can be linked, say, to Articles, Static Pages, Profiles, and Projects, I could add four separate selectbox links to it, like "Parent Article," "Parent Page," and so forth (of course, here the NULL option becomes very important), but it's a little messy.

Actually, the only reason I asked was because it was already enabled for section link and so I thought it wouldn't be too too hard to add it here. But now I'm realizing they probably work quite differently?

I have tried the Select Box Link field v 1.1 in Symphony 2.0.0 (stable).

I can not select parameter output for this field in my datasource. (This works with the standard Select Box field).

Is this:

  • a bug?
  • a technical limitation?

I'm experiencing the very same problem as michael-e, by the way (though I'm using the Git version of Symphony 2).

If I manually put the number in the filter field, all works correctly, while if I put there the $datasource_param (which is calculated correctly, according to the ?debug page) nothing is retrieved by the datasource.

Just to clarify: Let's say I have section1 and section2. In section1 I create a Select Box Link field, linking to section2's title fields. Now it is possible to filter my DS output for section1 using section2 parameter output. (And this works perfectly. @andre: Have you tried typing {$datasource_param} (including the brackets) in the filter field?)

I would like to execute filtering the other way round. The problem is: section1 does not provide parameter output of the Select Box Link field.

Is this a bug in the Select Box Link field extension? Should it provide this parameter output?

I've made a clean (without the workspace folder) install of the stable release. This extension is bundled with it. But I can't enable it. When I try, nothing happens.

When making a clean install, with the workspace folder, the extension is enabled.

What am I missing?

@michael-e: yes, I've tried to use curly brackets too, but still I couldn't make it work. So I asked my friend to try and do the same, and he did it. The only difference between my installation and his, it's that he's using Symphony downloaded from Overture, while I use GitHub's version.

Anyway, when I'll get back home I'm going to try again on a clean install from Git.

therosson, this is a bug that was introduced shortly before Symphony 2 was released, the simple fix is to edit the install function in the extensions extension.driver.php file so that it includes this on its last line:

return true;

Or you can update your version of Symphony from github, although this might not be ideal in a production environment.

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