Copied to clipboard

Flag this post as spam?

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


  • Prev-I 4 posts 24 karma points
    Oct 04, 2021 @ 19:05
    Prev-I
    0

    How to find all contents with specific property value

    I've recently added a property to handle custom URL and attached to all document type as composition.

    Now I've implemented a custom content Finder wich need ti search all content with "customizedUrl" property to see if requested url match.

    My solution load content content using this xpath "//customizedUrl" then search to matching value.

    There are other way to do this? Maybe something better performance wise

  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Oct 04, 2021 @ 19:37
    Jesper Mayntzhusen
    0

    Sounds like you are trying to do something that has a builtin (although hard to find) feature: https://our.umbraco.com/documentation/Reference/Routing/routing-properties#umbracourlalias

  • Prev-I 4 posts 24 karma points
    Oct 04, 2021 @ 19:46
    Prev-I
    0

    I've found that property but after some testing and search I've found that there are some problem on multilingual sites:

    https://github.com/umbraco/Umbraco-CMS/pull/7479

    On more general note, I'm curious ti find out the best way ti search content based on property values

  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Oct 04, 2021 @ 19:54
    Jesper Mayntzhusen
    0

    Fair enough wasn't aware of that bug.

    It probably depends on the use case, how often do you run the search, how big is the dataset, etc.

    But it's probably either an examine search or the content cache 🙂

  • Prev-I 4 posts 24 karma points
    Oct 04, 2021 @ 20:12
    Prev-I
    0

    I was trying to use linq2umbraco but I cannot grasp how to search at every depth from a root node.

    Right now the xpath query is executed on contentCache, but I've read that using xpath is considered deprecated now that cache is json based

Please Sign in or register to post replies

Write your reply to:

Draft