1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Need help in advanced search function

Need help in advanced search function

4 posts, 0 answered
  1. Venkatesh Alagu
    Venkatesh Alagu avatar
    42 posts
    Registered:
    22 Nov 2009
    04 Apr 2012
    Link to this post
    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
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    04 Apr 2012
    Link to this post
    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?
  3. Venkatesh Alagu
    Venkatesh Alagu avatar
    42 posts
    Registered:
    22 Nov 2009
    05 Apr 2012
    Link to this post
    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
  4. Venkatesh Alagu
    Venkatesh Alagu avatar
    42 posts
    Registered:
    22 Nov 2009
    23 Apr 2012
    Link to this post
    Steve,

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


    Thanks & Regards,

    Venkatesh
4 posts, 0 answered