XperienceCommunity.RelationshipsExtended.Core
1.0.1
dotnet add package XperienceCommunity.RelationshipsExtended.Core --version 1.0.1
NuGet\Install-Package XperienceCommunity.RelationshipsExtended.Core -Version 1.0.1
<PackageReference Include="XperienceCommunity.RelationshipsExtended.Core" Version="1.0.1" />
paket add XperienceCommunity.RelationshipsExtended.Core --version 1.0.1
#r "nuget: XperienceCommunity.RelationshipsExtended.Core, 1.0.1"
// Install XperienceCommunity.RelationshipsExtended.Core as a Cake Addin #addin nuget:?package=XperienceCommunity.RelationshipsExtended.Core&version=1.0.1 // Install XperienceCommunity.RelationshipsExtended.Core as a Cake Tool #tool nuget:?package=XperienceCommunity.RelationshipsExtended.Core&version=1.0.1
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.
- 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. - 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Kentico.Xperience.WebApp (>= 30.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on XperienceCommunity.RelationshipsExtended.Core:
Package | Downloads |
---|---|
XperienceCommunity.Baseline.Core.Library.Xperience
The Baseline a set of Core Systems, Tools, and Structure to ensure a superior Kentico Website that's easy to migrate, for Kentico Xperience 13 and eventually Xperience by Kentico |
|
XperienceCommunity.RelationshipsExtended.Admin
Aid to help fill in any remaining gaps for relationships in Xperience by Kentico. Restores the ContentItemTag (Category) as a central taxonomy binding for multiple page types, eventually will have language syncing and other features. This is the admin portion, can be installed stand alone or separately. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial Release, only contains Content Item Categories on the Properties tab of a Content Items. This does not contain the Admin.