umco / umbraco-ditto

Ditto - the friendly view-model mapper for Umbraco
http://our.umbraco.org/projects/developer-tools/ditto
MIT License
79 stars 33 forks source link

CurrentMemberAs attribute #137

Closed jamiepollock closed 8 years ago

jamiepollock commented 9 years ago

Hi folks, Just wondering what if using MembershipHelper, a way of turning IMembers into IPublishContent objects, has ever been considered as a core Ditto attribute?

I've been using my own custom value resolver locally with some success. An issue could be a current member isn't always available so how is that resolved? I'll admit I've only used it on controller which are login protected.

Is this feature bloat? I understand Ditto shouldn't cover everything Umbraco does (see the relations PR).

mattbrailsford commented 9 years ago

Personally I wouldn't include it in core myself, I think it's probably just a nice pattern to share. I do similar things with Teacommerce resolving current store and order. I think these things though are just good for our own add on libs.

leekelleher commented 9 years ago

@jamiepollock, we could always add it to the labs repo?

It doesn't necessarily have to be something that we release as such, more as a reference for people's own libraries.

I'll probably move the Relations ValueResolver PR over there too.

leekelleher commented 9 years ago

@mattbrailsford Meant to say, could do the same with TeaCommerce, (if re-usable)? I was thinking similar for Merchello, (since helping Barry with his recent workshop).

leekelleher commented 8 years ago

Closing this one.

@jamiepollock I'll set-up a "contrib" VS project over on the labs repo, if you wanted to collab?