2.0.2releasedSelect Box Link Field

Linking two sections together

Clone URLhttps://github.com/symphonycms/selectbox_link_field.git

Add as a submodulegit submodule add https://github.com/symphonycms/selectbox_link_field.git extensions/selectbox_link_field --recursive

Compatibility

2.x.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.x2.7.02.7.12.7.22.7.32.7.42.7.52.7.62.7.72.7.82.7.92.7.10
1.141.191.221.231.321.322.0.22.0.22.0.22.0.22.0.22.0.22.0.22.0.22.0.22.0.22.0.22.0.2

Readme

Select Box Link Field

Installation

  1. Upload the selectbox_link_field folder in this archive to your Symphony 'extensions' folder.
  2. Enable it by selecting the "Field: Select Box Link", choose Enable from the with-selected menu, then click Apply.
  3. You can now add the "Select Box Link" field to your sections.

Updating

  1. Be sure to visit the Extension page in the Symphony admin and enable "Select Box Link Field" so the database is updated accordingly.

Usage

  • Works in a near identical way to the standard select box field, however there is no static options 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.

  • Setting an instance of the field to be not required will cause an empty option to show up on the publish form.

Filtering options

The Select Box Link supports the following filtering options in your data sources:

  • Red Cats or not: Red Cats: Return all entries where the linked entry has the value of Red Cats (or does not have the value Red Cats)
  • red-cats or not: red-cats: Return all entries where the linked entry has the handle of red-cats (or does not have the handle red-cats)
  • 1 or not: 1: Return all entries where the linked entry ID is 1, (or is not 1)
  • sql-null-or-not: 1: Return all entries where the linked entry ID is not 1 or the entry has no linked entries.
  • sql: NULL: Return all entries that do not have any linked entries
  • sql: NOT NULL: Return all entries that have a linked entry

Please note that predicate filters, such as not: or sql:, will ignore all other data source filters for that field.

Sorting

The sorting is activated only if ALL related field are sortable.

Right now, to be sortable, the related field must have a value column in the entries data.

Version history

Symphony 2.6.0 to 2.x.x

        - [#87](https://github.com/symphonycms/selectbox_link_field/issues/87) Add missing canPrePopulate() function
	

Symphony 2.6.0 to 2.x.x

        - Fix for Symphony 2.7.0 with MySQL 5.7
	

Symphony 2.6.0 to 2.6.x

        - Switch to semver (but should be backward compatible)
	        - Fix for MySQL 5.7
	        - Do not create handles based on sanitized value
	        - Replace getParameterPoolValue by prepareTextValue when getting values
	

Symphony 2.6.0 to 2.6.x

        - Added basic sorting capabilities
	

Symphony 2.6.0 to 2.6.x

        - Mark compatibility with Symphony 2.6.0
	        - [#76](https://github.com/symphonycms/selectbox_link_field/issues/76) Better XML Importer support
	        - Improve functionality within the Publish Filtering interface
	        - Sanitize export values consistently
	

Symphony 2.4 to 2.5

        - Minor fix to handle multiple/single values consistently
	

Symphony 2.4 to 2.5

        - Mark compatibility with Symphony 2.4+
	        - Various updates for Symphony's associations
	        - Add implementation of `checkPostFieldData` and `preparePlainTextValue`
	        - Fixes for better publish filtering support in the core
	

Requires Symphony 2.4

        - General update to Symphony 2.4 (@brendo/@nilshoerrmann)
	        - [#46](https://github.com/symphonycms/selectbox_link_field/issues/46) Remove `optgroup` when there is only a single section (@nilshoerrmann)
	        - [#38](https://github.com/symphonycms/selectbox_link_field/issues/38) Prevent circular lookups (@andrewminton)
	        - Updates to German translation (@nilshoerrmann)
	        - Added French translation (@nitriques)
	

Symphony 2.3.3 to 2.3.x

        - [#18](https://github.com/symphonycms/selectbox_link_field/issues/18) Show a message when there are no entries in a section
	        - Correctly fetch file name and other values using the Exportable interface
	        - Revert to saving NULL instead of 0 when no value is selected
	        - Updated Russian translation
	

Symphony 2.3.3 to 2.3.x

        - Add Finnish and Polish translations
	        - Update links to **getsymphony.com**
	

Symphony 2.3.3 to 2.3.x

        - [#36](https://github.com/symphonycms/selectbox_link_field/issues/36) Add functionality to hide field in a prepopulated state
	        - [#35](https://github.com/symphonycms/selectbox_link_field/issues/35) Handle grouping on null values better
	        - When importing into the SBL field, if the data given is not entry ID's, attempt to find the entry ID's assuming the value we've been given is handles or values
	

Symphony 2.3.2 to 2.3.x

        - Implement the updated `ImportableField` interface
	        - Updated Russian language
	        - Handle sections that no longer exist
	

Symphony 2.3.1 to 2.3.x

        - [#30](https://github.com/symphonycms/selectbox_link_field/issues/30) Separate multiple values in the backend publish tables.
	        - [#29](https://github.com/symphonycms/selectbox_link_field/issues/29) Apply alternate SQL query for not: filters.
	        - [#20](https://github.com/symphonycms/selectbox_link_field/issues/20) Entries are now ordered the same way as their parent section.
	

Symphony 2.3.1 to 2.3.x

        - [#23](https://github.com/symphonycms/selectbox_link_field/pull/23) Fix invalid type error
	        - Add `ImportableField` and `ExportableField` support
	        - Fix issues where cached entries would not be unique (and therefore would no show in the backend)
	

Symphony 2.3 to 2.3.x

        - Updates for Symphony 2.3
	        - [#19](https://github.com/symphonycms/selectbox_link_field/issues/19) Add `sql-null-or-not:` filtering
	        - [#16](https://github.com/symphonycms/selectbox_link_field/issues/16) Ensure options are sorted by recency
	        - When a field is required, force users to select an option which is consistent with Symphony 2.3 behaviour
	        - Consistency updates with base core classes
	

Symphony 2.2 to 2.2.x

        - Implement `requiresSQLGrouping` function which prevents some oddities with pagination
	        - Preform some checks for `relation_id` to improve compatibility with extensions that extend the Select Box Link field.
	

Requires Symphony 2.2

        - Correctly load information about entries that fall outside of the limit (but are still attached to an entry)
	        - Prevention for an edge case where empty ID's are thrown around
	

Requires Symphony 2.2

        - Updates for Symphony 2.2
	        - Performance enhancements
	        - Don't allow grouping if multiple options are selected
	

Symphony 2.0.5 to 2.2

        - Allow the linked section's public column visibility to be toggled
	

Requires Symphony 2.0.5

        - Prevent `null` Relations from appearing in the Output XML
	

Requires Symphony 2.0.5

        - Added missing translation strings
	        - Added localisation files for Dutch, German, Portuguese (Brazil) and Russian
	

Requires Symphony 2.0.5

        - Fixed sort order of entries in select box. Corrected to use the column sort order. A bug in 1.13+ caused this particular issue to reappear. This fix is based on code by Nick Dunn initially introduced in 1.12.
	

Requires Symphony 2.0.5

        - `relation_id` can now be a `null` value. Fixes issue [#1](http://getsymphony.com/download/extensions/issues/view/20054/1/)
	

Requires Symphony 2.0

        - Made install and update functions more tolerant of existing tables
	        - Minor bug fixes for 2.0.7
	

Requires Symphony 2.0

        - Added filtering by handle functionality. Thanks **@creativedutchmen**
	

Requires Symphony 2.0

        - Fixed a couple of issues where 'related_field_id' was returning the wrong type. **@buzzomatic**
	        - In dropdown options, sort Sections by their Symphony order and sort Entries by their Symphony order (using EntryManager) **@nickdunn**
	        - Sort Sections in field's settings panel by Symphony order **@nickdunn**
	

Requires Symphony 2.0

        - Fixed bug that triggered a database error in Symphony version greater than 2.0.6
	

Requires Symphony 2.0

        - Added translations
	        - Possible to toggle values via publish tables
	

Requires Symphony 2.0

        - Warnings about incorrect data type, origination from line 409, are now suppressed
	        - Fixed sorting to work when "random" is selected
	

Requires Symphony 2.0

        - Fixed bug that caused no items to appear selected in publish area
	

Requires Symphony 2.0

        - Updated `fetchAssociatedEntrySearchValue()` to make use of `entry_id` passed in, if available
	

Requires Symphony 2.0

        Fixed problems with updating from a version earlier than 1.4
	

Requires Symphony 2.0

        - Added a limit to the number of entries shown in select box
	        - Allowed selection of multiple source sections
	

Requires Symphony 2.0

        - Enable Data Source param output for this field
	

Requires Symphony 2.0

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

Requires Symphony 2.0

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

Requires Symphony 2.0

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