Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jeff mayer 122 posts 200 karma points
    Nov 19, 2014 @ 16:58
    jeff mayer
    0

    Add radio button value to query

    Have an existing razor loop that retrieves  events  based on date. I need to fliter requests bases on event type in the query.   Using U7

     

    Existing query:

    var nodes = root.Descendants("CalendarItem").OrderBy("CalendarEventDayTimeStart").Where("CalendarEventDayTimeStart >= DateTime.Now.Date"  );

    I need to filter using the value from a radio button:

     

    I have used the following which works but not within the query above. Can this be combined to  limit records based on the event type  radio value? I don't want to include a nested if statement. I need to include within the initial query. 

    if ( Umbraco.GetPreValueAsString(CurrentPage.eventtype) == "conference" ) 

     

Please Sign in or register to post replies

Write your reply to:

Draft