Need help in advanced search function

Posted by Community Admin on 04-Aug-2018 04:24

Need help in advanced search function

All Replies

Posted by Community Admin on 04-Apr-2012 00:00

Hi,
Our client needs these kind of advanced search for their Recipe section. can u please help me how to configure this in sitefinity?

Is there any module available for these kind of search or other similar search also ok for us to implement and satisfy client needs?

Thanks & Regards,
Venkatesh

Posted by Community Admin on 04-Apr-2012 00:00

Should be easy

1) Get all items in those categories (this is a snippit using "Images" content type)

List<Telerik.Sitefinity.Libraries.Model.Image> images = new List<Telerik.Sitefinity.Libraries.Model.Image>();
 
            foreach (var cat in _categories)
            
                images.AddRange(App.WorkWith()
                            .Images()
                            .Where(
                            ci => ci.GetValue<IList<Guid>>("Category").Contains(cat) &&
                                  ci.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live &&
                                  ci.Visible == true)
                            .Get());
            
(Add in a text search filter in the fluent query as well).  So the categories would be each item in your filter list there I assume.

2) Bind the results to your RadListView
imagesListView.DataSource = images.OrderBy(x => x.Title);

Would that work?

Posted by Community Admin on 05-Apr-2012 00:00

Steve,

Thanks for your reply. we are going to do our site using Sitefinity 5.0. Whether it will work in latest version??

Can you please help me where i need to implement this code?


Thanks & Regards,

Venkatesh

Posted by Community Admin on 23-Apr-2012 00:00

Steve,

Can u please help me to solve this issue?? let me know where i want to embedd this code??


Thanks & Regards,

Venkatesh

This thread is closed