This project is read-only.

Projection Filter

Topics: Customizing Orchard
Mar 9, 2012 at 12:12 PM


i have a List with Newsentrys. Now would i filter them in relation of a company.

I think to Add a TextField in the NewsPart like "CompanyName". Now add a ProjectionWidget on the Company (Item of a List, ItemName = CompanyName) and will show them the News where TextField "CompanyName" equals to ItemName.

How i make that Filter? Is this possible? With {Content.DisplayText} i have no success. 

I have many Items in the Companylist and would not add for every Company another Query. 

And for what are thes Thinks like {Content.Id} and many more on the Filters? For example which Id was that? The ID from the ProjectorWidget, or from the PageContent on which Site that Widget was?


Mar 9, 2012 at 11:45 PM

Use a Projector query instead of List. List is pretty much obsolete now.

Apr 5, 2012 at 12:34 PM

Now i will make a fresh installation of v1.4.

(without Lists ;) )

Now i have two ContentTypes. One is Company (with a TextField: CompanyID) and the other one is News (also a TextField: CompanyID).

So i would create a Query for the Projection Module that is filtering my news on a company-page with the CompanyID.

My trys are add to the Filter the two ContentTypes, than add a third filter with the NewsType.CompanyID Textfield equals the token {TypeDefinition.Fields:Companys.CompanyID} - no success.

Then add only the NewsType and a second Filter: NewsType.CompanyID equals {TypeDefinition.Fields:Companys.CompanyID} - no success.

and many many more...


Is that anyhow possible?

I would Filter the NewsType based on the CompanyID (on the Company-DetailPage)...

Thank you very much.