Copied to clipboard

Flag this post as spam?

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


  • Arie 224 posts 675 karma points
    Aug 10, 2014 @ 16:45
    Arie
    0

    Loop not returning events

    For some reason I'm not getting any results.

    Content Tree:

    - Home
      - Calendar POC (DocType: contentPage)
        - Events (DocType: eventFolder)
          - Event 1 (DocType: event)
          - Event 2 (DocType: event)
          - Event 3 (DocType: event)
    

    View:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @using KS.Umbraco7.Calendar.Core
    
        <h3>Events</h3>
        <ul>
            @foreach (CalendarEvent ce in Calendar.getEvents(DateTime.Now.Date, DateTime.Now.AddDays(80), "event"))
            {
                <li>
                    @ce.content.Name
                </li>
            }
        </ul>
    

    I'm trying to display the events on the node "Calendar POC". My assumption was that the module would search for all nodes with the DocType "event", but perhaps I'm mistaken?

  • Arie 224 posts 675 karma points
    Aug 10, 2014 @ 16:59
    Arie
    100

    Figured it out; I was using the DocType name instead of the Property name...

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies