Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Extensions : Custom groups #6

Merged
merged 1 commit into from
Nov 8, 2016

Conversation

KevinJump
Copy link
Contributor

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.

…rsonalization groups in.

Adding a couple of extra extension methods, so we can pass in our own
set of personalization groups. This enables us to get the groups from
other properties, or child items, which means we can do stuff like
customize the grid blocks (if a grid editor has a personalization group
on it, then we can call the ShowToVisitor on that block and hide / show
it accordingly.
@AndyButland
Copy link
Owner

Thanks for this Kevin, nice idea. I'll hopefully to get to pulling this in this evening.

@AndyButland AndyButland merged commit 993a459 into AndyButland:master Nov 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants