Developer forum

Forum » Development » NewsList AND operator

NewsList AND operator

Nuno Aguiar
Reply

Hi,

We have a client that wants to change the newslist recordset. Instead of loading all the news where newscategory = A OR newscategory = B to news that belong to category A AND category B

 

In NewsListTemplateExtender the right way to do it? I don't know if I will have paging issues filtering the newslist on the template extender level. Should/Could this be a desirable feature request?

 

Nuno


Replies

 
Nuno Aguiar
Reply

Hi Guys,

 

No ideas from anyone? I would really like to avoid creating a new module just because of this :(

 

Nuno

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Nuno

 

The Dynamicweb.Modules.News.Notifications.Frontend.AfterSelectData notification found in Dynamicweb.Modules.dll has an arguments object with a data property. That property can be casted to a NewsItemCollection from the Dynamicweb.Modules.News namespace - change the content of that collection to do what you are trying.

 

Set the paragraph settings to include all news from A and B, and delete those from the collection that are not part of both groups.

 

BR Nicolai

Votes for this answer: 1
 
Nuno Aguiar
Reply

Hi Nicolai,

 

Thanks, I will do that.

 

Best Regards,

 

You must be logged in to post in the forum