Developer forum

Forum » Ecommerce - Standard features » Get the whole group path

Get the whole group path

Adrian Ursu
Reply

Hi Guys,

Is there a way to get the whole group path (like the breadcrumb) using just the GroupID?

Or at least to get the topmost Group based on the GroupID?

Thanks,

Adrian


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Adrian

When you have a groupid, you can access Group.GetGroupById(GroupID) and that object has both a Subgroups property and a ParentGroups property.

Since a group can have multiple parent groups, that property returns a collection of groups, so you have to build some logic that decides which parent to follow if the group has more than one. By following the parent groups, you can find the top.

BR Nicolai

 
Adrian Ursu
Reply

Thanks a lot Nicolai.

I believe I can use that.

Regards,

Adrian

 

You must be logged in to post in the forum