Standard get Community groups in a macro?

Evine Beursken asked on April 10, 2017 09:53

Hi,

I would like to check multiple things of a group inside a macro. I thought it was possible to do something like: {% groups[QueryString["groupguid"]].getspecificProperty()%} and then to get a certain property instead of writing custom macro's to get specific properties of a group.

However, is this possible to get all groups at once and do an index based on that(these are user groups inside Social&Community, just out-of-the-box Kentico).

Thanks in advance!

Correct Answer

Jan Hermann answered on April 11, 2017 09:57

If you need to retrieve a group using GUID, then use this macro:

{% SiteObjects.Groups.Where("GroupGUID="+QueryString.GetValue("groupguid")).FirstItem.GetValue("GroupName") |(identity)GlobalAdministrator%}

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.