This project is read-only.

Projector on Owner

Topics: Customizing Orchard, General
Jan 26, 2012 at 1:20 AM

How can I create a Projector Filter to select Content Items based on the Owner? Is this an omission or is there a better way to do it?

Jan 26, 2012 at 1:35 AM

I don't think there is a "Owner" filter. You might want to file an issue for this.

Then it would require a username, which could also be taken from a tokenized value like the current authenticated user. Could be used in admin screens too to show all the content for the current authenticated user.

Jan 26, 2012 at 1:36 AM

And if you provide a patch with the issue, then it will get integrated quickly. Take a look at the CreationDate filter. Just do the same of the Owner property instead, using a String filter provider.

Jan 26, 2012 at 4:07 AM
Edited Jan 26, 2012 at 4:08 AM

Searching for CreationDate in the source finds nothing.

I suspect it might not be quite so simple as the Owner is not part of the CommonPartRecord, only the OwnerId, so would need to lazy load the Owner, in the same way you do on the CommonPart?

Where would the owner filter live? Can you point to existing similar code?