XperienceCommunity.TreeNodeSelectorFormControl
1.0.8-c
See the version list below for details.
dotnet add package XperienceCommunity.TreeNodeSelectorFormControl --version 1.0.8-c
NuGet\Install-Package XperienceCommunity.TreeNodeSelectorFormControl -Version 1.0.8-c
<PackageReference Include="XperienceCommunity.TreeNodeSelectorFormControl" Version="1.0.8-c" />
paket add XperienceCommunity.TreeNodeSelectorFormControl --version 1.0.8-c
#r "nuget: XperienceCommunity.TreeNodeSelectorFormControl, 1.0.8-c"
// Install XperienceCommunity.TreeNodeSelectorFormControl as a Cake Addin #addin nuget:?package=XperienceCommunity.TreeNodeSelectorFormControl&version=1.0.8-c&prerelease // Install XperienceCommunity.TreeNodeSelectorFormControl as a Cake Tool #tool nuget:?package=XperienceCommunity.TreeNodeSelectorFormControl&version=1.0.8-c&prerelease
Kentico Xperience TreeNode Selector Form Control
This Kentico Xperience form control provides a tree-based selector, with configurable page type and path filters.
Purpose
Creating reusable, atomic content, and composing pages using content relationships is becoming increasingly popular with the advent of headless CMS and hybrid CMS platforms. In Kentico Xperience, this control provides an easy way to provide an authoring experience for composing content using content references.
Features
Tree-based browsing
Unlike out-of-the-box selectors, this selector provides a tree view so that authors can drill-down to the content they want to select.
Single-selection
When the control's Reference Limit is set to 1, the control can be used with a Unique identifier (GUID) or a Text field type and will operate in a single-select mode. The value of the field will be the NodeGUID of the selected item.
Multi-selection
When the control's Reference Limit is set to greater than 1, the control can be used with a Long text field type and will operate in a multi-select mode. The field value will be a semi-colon delimited list of the selected NodeGUIDs.
Search support
The selector supports searching for content by name.
Page type filtering
This control has a Page Types property that allows selecting the page types that are allowed in a field. For example, the selector could be configured to only allow Articles, Manufacturers, Coffee, and Landing pages (to use Dancing Goat examples).
In this screenshot, notice that only the configured page types can be selected.
Here's an example of the Page Types property. You can populate it with a macro expression. For example, you could use a macro to return all the page types that inherit from a base type.
Starting path filtering
The control's Starting Path configuration allows filtering the section of the tree that may be selected. Simply enter the NodeAliasPath to use as the root of the selector.
Reference Limit configuration
When the control's Reference Limit is reached, the remaining nodes are disabled to prevent additional selection.
Multi-culture support
The control will allow browsing the content tree even when the parent nodes are not translated into the current culture.
Related content editing
The control allows authors to quickly edit related content. Clicking the Edit button, opens the related node's Content form for quick access to the related content.
Content order
The control allows controlling the order of the related content using drag-and-drop.
Install
- Add the NuGet package, XperienceCommunity.TreeNodeSelectorFormControl to your Kentico CMS project.
- Add the package version of Kentico.Xperience.Libraries that matches your Xperience hotfix version. This is critical to prevent the 13.0.0 version of the Xperience libraries from being used when compiling your project.
- Build your CMS project.
- The first time you start the application, the XperienceCommunity.TreeNodeSelectorFormControl module will create the Kentico Form control configuration and Query object to support this selector.
Uninstall
- Remove the package XperienceCommunity.TreeNodeSelectorFormControl from your CMS project.
- Rebuild the CMS project.
- Kentico will remove the Module and Form control configuration the next time the CMS application starts. The query *cms.root.relatedcontentselectortree will not be removed, because Kentico does not relate queries to modules, unless the module has a custom class and the query is added to it.
Compatibility
- .NET 4.8 or higher for the admin app or MVC5 projects
- Kentico Xperience versions 13.0.0 or higher
License
This project uses a standard MIT license which can be found here.
Contribution
Contributions are welcome. Feel free to submit pull requests to the repo.
Support
Please report bugs as issues in this GitHub repo. We'll respond as soon as possible.
https://github.com/heywills/xperience-treenode-selector-form-control/issues
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- Kentico.Xperience.Libraries (>= 13.0.0 && < 13.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1.0.8 - Optimized SQL query for performance. It increased document name filtering performance by 5 times in some tests.
- Optimized search results by reducing automatic tree expansion from up to 20 sections down to 3 sections.
This reduces the number of SQL queries that are automatically executed when a search is performed.
- Improved search user experience by adding a loading indicator when a search is submitted.
1.0.7 - Fixed bug that caused item removal or sorting to be lost during postbacks triggered by sibling controls.
- Added caching to improve postback performance.
- Optimized queries of multiple treenodes.
- Resolved script error caused by removal of DeviceContext/OEIsMobile from Kentico 13.
1.0.6 - Fixed bug that prevented users from having more than one word in search query
1.0.5 - Fixed bug that prevented limiting page selection to exactly two.
- Updated Kentico.Xperience.Libraries 13.0.13 to prevent requiring an assemblyBinding to continuousintegration.exe.config.
1.0.4 - Fixed potential for missing cms.query dependency
1.0.3 - Support for culture codes greater than 5 chars
1.0.2 - Support for hosting CMS in an IIS virtual directory
1.0.1 - Initial version