Skip to content

In the ContentDirector the IContentItemActionProvider.LinkChildren() should allow for Page items and not just Content Items. #549

@flemings

Description

@flemings

Motivation

There is a need to link certain children of a page to that page a as referenced content items or page items. Similar to ILinkedPageActionProvider.StoreReferenceInAncestor().

There exists a pattern in K13 where children items are used in the display of a parent page. The children items are being migrated as Content Hub items, and we need to link those items to the patent page which will remain a page in the tree.

Proposed solution

The LinkChildren method should be updated to allow for Pages and not just Content Items.

//We need children of Page to be linked children in node order
if (source.TargetClassName == "Web.PageNode")
{
//HTML Block content item content type has NodeClassID = 6556
options.LinkChildren("HTMLBlock-Migration", source.ChildNodes!.Where(x => x.NodeClassID == 6556).OrderBy(x => x.NodeOrder));
}

Additional context

Add any other context, screenshots, or reference links about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions