Copied to clipboard

Flag this post as spam?

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


  • Marek 16 posts 78 karma points
    Apr 28, 2014 @ 18:24
    Marek
    0

    Show on calendar

    Hi i would like to show all dates on calendar

    i try to get all data

    var root = Model.AncestorOrSelf(1);

    on Partial View Macro File but i have error

    how to get all DateRange from all page and show it on calendar (jquery ui)

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Apr 28, 2014 @ 21:02
    Dan Diplo
    0

    I'm not sure how your pages are set-up, but you would need to get a list of all nodes that have a date range property. So something like:

    var pages = Model.Content.AncestorOrSelf().Descendants().Where(x => x.HasProperty("dateRange");
    
    foreach (page in pages)
    {
        var dateRange = page.GetPropertyValue<Diplo.DateRangePicker.DateRange>("dateRange");
    }
    
    

    See http://our.umbraco.org/documentation/Reference/Templating/Mvc/querying for how to query.

  • Marek 16 posts 78 karma points
    May 08, 2014 @ 11:59
    Marek
    0

    Hi

    thx you very much it helps me. i have done it ;)

Please Sign in or register to post replies

Write your reply to:

Draft