RelationshipsExtended 13.0.6

Suggested Alternatives

RelationshipsExtended 13.0.11

Additional Details

These versions of the Relationships extended contained referenced to Kentico.Xperience.Libraries and lib files of version 13.0.0.  Any reference below 13.0.13 cause a error unless binding redirects are created.  This package now references the proper minimum version of 13.0.13.

There is a newer version of this package available.
See the version list below for details.
dotnet add package RelationshipsExtended --version 13.0.6                
NuGet\Install-Package RelationshipsExtended -Version 13.0.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RelationshipsExtended" Version="13.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RelationshipsExtended --version 13.0.6                
#r "nuget: RelationshipsExtended, 13.0.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RelationshipsExtended as a Cake Addin
#addin nuget:?package=RelationshipsExtended&version=13.0.6

// Install RelationshipsExtended as a Cake Tool
#tool nuget:?package=RelationshipsExtended&version=13.0.6                

RelationshipsExtended

Relationships Extended Module for Kentico This tool extends Kentico by allowing support and management tools for 6 Relationship scenarios:

  • Related Pages (Both Orderable AdHoc Relationships and Unordered Relationships)
  • Node Categories (using CMS.TreeNode)
  • Node Categories (using a Custom Joining Table)
  • Object to Object binding with Ordering
  • Node to Object binding with Ordering
  • Node to Object binding without Ordering

Installation

Admin

  • Open your Kentico Solution and right click on the CMS Project, and select "Manage NuGet Packages..."
  • Search for RelationshipsExtended and select the major version that mathces your Kentico version (ex 10.0.0 = Kentico 10, 11.0.0 = Kentico 11, etc)
  • After your NuGet package finishes installing, run your Keintico site. Ignore the Event Log Error for the RelationshipsExtended ErrorSettingForeignKeys as that always happens on the first start up.
  • Go to System → Restart Application
  • Also go to System → Macros → Signatures and resign your macros.

MVC

If you are using Kentico 12 MVC or Kentico 13 MVC (.Net or .Net Core) you should also install the RelationshipsExtended.MVC.Standard for Kentico 13, or RelationshipsExtendedMVCHelper for Kentico 12 NuGet package.

Lastly hook up RelationshipsExtendedHelper as the implementation for IRelationshipsExtendedHelper.

For MVC.Net Core, add to the Startup.cs's ConfigureServices services.AddSingleton(typeof(IRelationshipExtendedHelper), typeof(RelationshipsExtendedHelper));

For MVC.Net Framework, you will have to use your own IoC, such as AutoFac

// builder is of type ContainerBuilder
builder.RegisterType(typeof(RelationshipsExtendedHelper)).As(typeof(IRelationshipExtendedHelper));

This will provide you with TreeCategory, DocumentQuery/ObjectQuery extensions, and AdHoc relationship support and event hooks that the Admin (Mother) also contain, so any adjustments in code will also work properly with staging and such.

Documentation

If you are new to the tool, you have two options for learning how to use this.

  1. Check out the Demo section, which contains an example project with each scenario and it's configuration. You can include the Demo project on your Admin, and go to Site → Import site or objects on the RelationshipsExtendedDemoModule.13.0.0.zip file to install the Demo module and it's UI elements.
  2. Check out the Wiki page on this GitHub to get a general overview.

Batch Modification

It is possible that during batch adjustments across multiple objects, that transactions can get locked, causing errors. It is recommended in this case to not log the synchronization task during the batch operations, and then manually trigger an update a staging event after if something was changed. Under normaly operations on single items


using(CMSActionContext context = new CMSActionContect() {
   LogSynchronization = false
   }) {
    // Batch operation where multiple related objects are done
   }
   
   if(UpdateWasMade) {
        // Tree node update
        DocumentSynchronizationHelper.LogDocumentChange(new LogMultipleDocumentChangeSettings()
        {
            NodeAliasPath = AssetParent.NodeAliasPath,
            CultureCode = AssetParent.DocumentCulture,
            TaskType = TaskTypeEnum.UpdateDocument,
            Tree = AssetParent.TreeProvider,
            SiteName = AssetParent.NodeSiteName,
            RunAsynchronously = false,
            User = MembershipContext.AuthenticatedUser
        });
        // Object update
        ParentObjectInfoProvider.Set(TheParentObject);
   }

    // In a global event hook
    private void ParentCategories_Insert_Or_Delete_After(object sender, ObjectEventArgs e)
    {
        if (CMSActionContext.CurrentLogSynchronization)
        {
            RelHelper.HandleNodeBindingInsertUpdateDeleteEvent(((ParentCategoryInfo.TypesInfo)e.Object).refNodeID, ParentCategoryInfo.TypesInfo.OBJECT_TYPE);
        }
    }


Query Extensions

The following Extension methods have been added to all ObjectQuery and DocumentQuery, see the project's readme for more info on usage. Except for InRelationWithOrder which is available in all versions, these are only in 13+

  • BindingCategoryCondition: Filter items based on a Binding table that leverages CMS_Categories
  • DocumentCategoryCondition: Filter items based on Document Categories
  • TreeCategoryCondition: Filter items based on Tree Categories
  • BindingCondition: Filter items based on a Binding table
  • InCustomRelationshipWithOrder: Show objects related through a custom binding table with ordering support
  • InRelationWithOrder: Show related Pages with order support (Available in Kentico 10-13)

You can see some samples check this MVC Controller

Contributions, bug fixes and License

Feel free to Fork and submit pull requests to contribute.

You can submit bugs through the issue list and i will get to them as soon as i can, unless you want to fix it yourself and submit a pull request!

This is free to use and modify!

Compatability

Can be used on any Kentico 10.0.52, 11.0.48+, and Kentico 12 SP site (hotfix 29 or above), and Kentico 13.0.0

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
13.0.11 405 1/15/2024
13.0.10 151 1/15/2024 13.0.10 is deprecated because it has critical bugs.
13.0.9 1,519 5/5/2023 13.0.9 is deprecated because it has critical bugs.
13.0.8 233 5/5/2023 13.0.8 is deprecated because it has critical bugs.
13.0.7 211 5/3/2023 13.0.7 is deprecated because it has critical bugs.
13.0.6 299 4/21/2023 13.0.6 is deprecated because it has critical bugs.
13.0.5 512 1/25/2023 13.0.5 is deprecated because it has critical bugs.
13.0.4 454 12/19/2022 13.0.4 is deprecated because it has critical bugs.
13.0.3 8,677 11/12/2020 13.0.3 is deprecated because it has critical bugs.
13.0.2 621 11/12/2020 13.0.2 is deprecated because it has critical bugs.
13.0.1 480 11/12/2020 13.0.1 is deprecated because it has critical bugs.
13.0.0 514 11/11/2020 13.0.0 is deprecated because it has critical bugs.
12.29.8 648 4/28/2021
12.29.6 499 11/30/2020
12.29.5 919 9/4/2020
12.29.4 522 8/18/2020
12.29.3 589 7/20/2020
12.29.2 3,483 9/12/2019
12.29.1 620 8/28/2019
12.29.0 649 7/24/2019
12.0.14 876 4/12/2019
12.0.12 631 4/11/2019
12.0.11 670 4/9/2019
12.0.10 661 4/8/2019
12.0.9 653 4/1/2019
12.0.8 633 3/28/2019
11.48.8 426 4/28/2021
11.48.6 514 9/4/2020
11.48.5 520 7/20/2020
11.48.4 554 10/31/2019
11.48.2 609 9/12/2019
11.48.1 616 8/28/2019
11.48.0 587 7/24/2019
11.0.14 648 4/12/2019
11.0.12 678 4/11/2019
11.0.10 652 4/8/2019
11.0.9 649 4/1/2019
11.0.8 631 3/28/2019
10.52.8 391 4/28/2021
10.52.4 530 9/4/2020
10.52.3 526 7/20/2020
10.52.2 579 9/12/2019
10.52.1 575 8/28/2019
10.52.0 600 7/24/2019
10.0.14 646 4/12/2019
10.0.12 653 4/11/2019
10.0.10 646 4/8/2019
10.0.9 667 4/1/2019
10.0.8 634 3/28/2019

Fixed a bug that was in 13.0.4 and 13.0.5 where the additional Page Templates, Webparts, and other tools were NOT included in the import, and fix foreign key query