Copied to clipboard

Flag this post as spam?

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


  • Drew Mayo 24 posts 125 karma points
    Mar 16, 2023 @ 21:03
    Drew Mayo
    0

    xPath used to return values

    All, I'm working on converting an Umbraco 7 site to Umbraco 8.

    A line that works in 7 now returns null in 8:

    var foundElements = UmbracoHelper.ContentAtXPath("//Product[productType='Widget']");

    The productType field is a drop down data type (Umbraco.Dropdown.Flexible). When trying similar xpath queries where the property is just a text field it works as desired.

    From the best I can tell from the docs, this should still work. Or should I code it a different way? Any help is appreciated,

    Drew

Please Sign in or register to post replies

Write your reply to:

Draft