Cannot create binding for Container_id


All other fields from the CommonPartRecord are bindable. This would be very useful when trying to filter items by their container.

file attachments

Closed Oct 2, 2012 at 8:54 PM by sebastienros
Container_Id is a relationship, not a regular property, so it can't be bound. You need a custom filter for that. Do it, we'll integrate it in core.


sebastienros wrote Sep 25, 2012 at 8:39 PM

IS there a bug when you try to do it ? Otherwise you might want to create a custom filter, maybe also using the Content Picker

ilektran wrote Sep 25, 2012 at 9:20 PM

In the screen cap of a fresh install which is the same on all other installs I have done, the only options for CommonPartRecord in the Binding options are: OwnerId, CreatedUtc, PublishedUtc, ModifiedUtc, and Id. Container_id is not being mapped as a bindable property. I do not understand well enough the inner workings of the projection module's use of reflection to identify why this single property is not an option.

This is for the purpose for creating a customized projection of contained items. I'm not sure how Content Picker will help me with that, and I have not had much success in using filters based on enumeration values (see: http://orchard.codeplex.com/workitem/18706). If I could at least specify the ContainerId it would fix a lot of not-so-successful work-arounds. :)

ilektran wrote Oct 3, 2012 at 12:42 AM

I'll give it a shot.

Piedone wrote Nov 1, 2012 at 12:18 AM

I've implemented this long time ago in my Helpful Libraries module: see the docs (http://helpfullibraries.codeplex.com/wikipage?title=Contents%20Libraries&referringTitle=Documentation), look for "ContainedByFilter Projector filter".

Codinlab wrote Aug 6, 2014 at 11:02 AM

Hi Zoltan, how about pushing your ContainedByFilter into Core ?
I think it's a must have filter when working with 1-n relations between contents.

I can make the PR if you don't have the time...

Codinlab wrote Aug 9, 2014 at 1:28 PM

Pushed a PR to add ContainedByFilter into Core and another one for retrieving routed content in Tokens