Developer forum

Forum » Development » BeforeSelectData notification

BeforeSelectData notification

Aki Ruuskanen
Reply
Hi,

I want to modify the newlist collection and I guess the BeforeSelectData notification is the way to go.

The FrontendDataNotificationArgs ha a attribute called Data of type Object. What does it contain? Is it a collection of items?

Regards  /Aki

Replies

 
Pavel Volgarev
Reply
This post has been marked as an answer
Hi Aki,

You should use AfterSelectData notification instead if you want to modify the existing collection since the BeforeSelectData provides no information about the news list that will be rendered (in other words, the notification fires before the list data is selected).

The Data property in this case is of type Dynamicweb.Modules.News.NewsItemCollection.

If you want to provide your own news list instead of modifying the default one then use BeforeSelectData.

-- Pavel
Votes for this answer: 0

 

You must be logged in to post in the forum