1

From a DD4T project, I'm trying to get the children from an OrganizationalItem but the object doesn't have that property. I'm runing a MVC project and I'm trying to get the page from the controller on the web application.

public class NavigationService
{    
    private readonly IPageFactory _pageFactory;

    public NavigationService(IpageFactory pagefactory)
    {
        _pageFactory = pageFactory;
    }
    private void GetPagesFromStructureGroup(NavigationItem navItem)
    {
        if (!_pageFactory.TryGetPage(navItem.Tcm, out var StructureGroup))
            return null;
        var structureGroup = StructureGroup.StructureGroup;
    }
}
2
  • can you explain in a bit more detail clearly, what are trying to do, are you trying this on the CM side or web app side?
    – Velmurugan
    Mar 26, 2022 at 7:32
  • The StructureGroup object does not exist in the Delivery side, it's a Content Manager only object. I think you may need to rethink the solution.
    – Nuno Linhares
    Mar 30, 2022 at 11:13

1 Answer 1

1

There is no way to get a list of children of an organizational item (folder, structuregroup) in DD4T. This is because this is not possible on the content delivery side of Tridion at all.

I would recommend writing a custom DD4T page template to achieve this. See Install DD4T templates for Tridion Sites 9.5 for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.