Bjarne Fyrstenborg
09/16/2024, 12:55 PMAddChildCollectionGroup()
and AddChildCollection()
in Umbraco UI builder?
I looked at the docs here: https://docs.umbraco.com/umbraco-ui-builder/v/13.ui-builder.latest-lts/collections/child-collections/child-collection-groups but I can't figure out how StudentProjectController
is used/called:
https://docs.umbraco.com/umbraco-ui-builder/v/13.ui-builder.latest-lts/collections/child-collections/retrieve-child-collections
In my specific use-case I can list members (readonly) and want to map entities from a custom db table with logs/audits for a member using member.
Is this possible?Jemayn
09/16/2024, 4:16 PMcsharp
builder.AddSection(
"SectionName",
sectionConfig =>
sectionConfig.Tree(treeConfig =>
treeConfig
.AddCollection<ParentModel>(
x => x.ParentId,
"Parent",
"Parents",
"List of parents",
"icon-client",
"icon-client",
collectionConfig =>
collectionConfig
.SetRepositoryType<ParentUiRepository>()
.AddChildCollection<ChildModel>(
x => x.ChildId,
"Children",
"List of children",
"icon-client",
"icon-client",
childCollectionConfig =>
childCollectionConfig
.SetRepositoryType<ChildUiRepository>()
.SetNameProperty(x => x.Name)
Bjarne Fyrstenborg
09/16/2024, 7:14 PMAddChildCollection<T>()
should work with an existing table:
https://docs.umbraco.com/umbraco-ui-builder/collections/child-collections/retrieve-child-collections#child-repositories
I guess it requires adding a relation db table with parent/child id.
It would be great if the model examples also had SQL query for the table creation.Jemayn
09/16/2024, 7:18 PMBjarne Fyrstenborg
09/17/2024, 5:14 AMUserId
column, which value is member id in Umbraco cmsMember table.Bjarne Fyrstenborg
09/17/2024, 5:24 AMA hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by