Adding a generic extra extension method, where you can pass in the list of group Ids.
This involves changing the main extension method to take a list of groups in then creating a stub extension method to maintain the existing functionality, and a new UmbracoHelper Extension method, that takes a list of integer values - and uses them as the personalization group ids.
Then we can pass in our own set of personalization groups. This enables us to get the groups from other properties, or child items.
In our specific example, we are using LeBlender to create custom Grid Editors, and adding the Personalization Group Picker to the editor. At render time, we are getting the groups from the value in the editor and passing it to the new generic extension method Umbraco.ShowToVisitor(groupIds). This means we can then have personalized blocks on our grid layout.
Adding a generic extra extension method, where you can pass in the list of group Ids.
This involves changing the main extension method to take a list of groups in then creating a stub extension method to maintain the existing functionality, and a new UmbracoHelper Extension method, that takes a list of integer values - and uses them as the personalization group ids.
Then we can pass in our own set of personalization groups. This enables us to get the groups from other properties, or child items.
In our specific example, we are using LeBlender to create custom Grid Editors, and adding the Personalization Group Picker to the editor. At render time, we are getting the groups from the value in the editor and passing it to the new generic extension method
Umbraco.ShowToVisitor(groupIds)
. This means we can then have personalized blocks on our grid layout.