Copied to clipboard

Flag this post as spam?

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


  • Tony Lorentzen 76 posts 154 karma points
    Mar 25, 2019 @ 21:01
    Tony Lorentzen
    0

    IsHelpers not available?

    I'm @using Umbraco.Web in my Partial View and getting a selection of nodes by using Model.ChildrenOfType ... blablabla but in my foreach statement I'm trying to look at item.IsOdd - but getting this error:

    System.Web.HttpCompileException (0x80004005): H:\xxx\MyPartialView.cshtml(26): error CS1061: 'IPublishedContent' does not contain a definition for 'IsOdd' and no accessible extension method 'IsOdd' accepting a first argument of type 'IPublishedContent' could be found (are you missing a using directive or an assembly reference?)

    If I disregard the IsHelpers and use oldskool integer count % 2 == 0 then I can get it working. But shouldn't this just work?

    Running into a lot of these kinds of quirks with Umbraco 8 with code that's previously tested and working with 7.x.

    What's going on - is Umbraco 8 just buggy as hell?! Website said it was ready for primetime (production) and not I'm developing a site in it and this happens. Frustrating!

  • Tony Lorentzen 76 posts 154 karma points
    Mar 25, 2019 @ 21:17
    Tony Lorentzen
    1

    Sometimes I wish I could just go back to the good old days with XSLT - this MVC and Razor is killing my productivity.

  • 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