Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am tring to list the Children of a currentPage and its events apropriate. Just like:
Current Page
Child1 (Has the calendar property)
First event of Child1
Second event of Child1
...
Last event of Child1
Child2
First event of Child2
.... and so on
The Following Code returns no events:
<code>
@foreach (var kurschen in CurrentPage.Children) { <p>@kurschen.Name</p> <ul> @foreach (CalendarEvent ce in Calendar.getEvents(DateTime.Now.Date, DateTime.Now.AddDays(365), "skBegin", kurschen )) { <p> </p> <li> <a href="/projects/website-utilities/ksumbraco7calendar/ksumbraco7calendar/ce.content.Url"> @ce.startDate.ToString("dd MMM") - @ce.content.Name </a> </li> } </ul>}
how can I use the "StartNode" property?
Is there some way to list the events of a child?
Thanks
I'm not sure if i understand you setup, but the calendar property shoud be on the events, not it's parent.
The startnode-property should be the parent or ancestor for one or more nodes that as the calendar property.
Hope this answeres your questions.
is working on a reply...
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.
Continue discussion
Get Calendar.GetEvents of a child of the CurrentPage
I am tring to list the Children of a currentPage and its events apropriate. Just like:
Current Page
Child1 (Has the calendar property)
First event of Child1
Second event of Child1
...
Last event of Child1
Child2
First event of Child2
.... and so on
The Following Code returns no events:
<code>
@foreach (var kurschen in CurrentPage.Children)
{
<p>@kurschen.Name</p>
<ul>
@foreach (CalendarEvent ce in Calendar.getEvents(DateTime.Now.Date, DateTime.Now.AddDays(365), "skBegin", kurschen ))
{
<p> </p>
<li> <a href="/projects/website-utilities/ksumbraco7calendar/ksumbraco7calendar/ce.content.Url">
@ce.startDate.ToString("dd MMM") - @ce.content.Name
</a> </li>
}
</ul>
}
<code>
how can I use the "StartNode" property?
Is there some way to list the events of a child?
Thanks
I'm not sure if i understand you setup, but the calendar property shoud be on the events, not it's parent.
The startnode-property should be the parent or ancestor for one or more nodes that as the calendar property.
Hope this answeres your questions.
is working on a reply...
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.