I'm trying to add it like this but I keep getting an Could not retreive Tree alias error.
builder.WithSection(Vendr.Umbraco.Constants.Sections.Commerce)
.WithTree(Vendr.Umbraco.Constants.Trees.Stores.Alias)
.AddVirtualSubTree(ctx =>
{
if (!Guid.TryParse(ctx.Source.Id, out var id)) return false;
var store = VendrApi.Instance.GetStores().SingleOrDefault(store => store.Id == id);
return store is not null;
})
.SetAlias("testVirtualSubTree")
.AddCollection<Asset>(x => x.Id, x => x.StoreId, "Asset", "Assets",
"This is a description")
.SetAlias("test")
.SetNameProperty(x => x.InternalRef);
How to add a VirtualSubTree to Vendr Store
Hi Matt,
Do you have any sample code to show how to implement a VirtualSubTree for a Vendr store, like the one shown in this example?
https://docs.getkonstrukt.net/advanced/virtual-sub-trees
I'm trying to add it like this but I keep getting an
Could not retreive Tree alias
error.Hey Philip,
Here's one that I created in a demo for a presentation. Hopefully this helps.
Hi Matt,
Thanks for the quick reply. Unfortunately that code produces the same error, it could possibly be a bug. I'll raise an issue on GitHub.
Cheers
Phil
is working on a reply...