Copied to clipboard

Flag this post as spam?

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


  • kjmitch 3 posts 73 karma points
    Sep 29, 2021 @ 18:08
    kjmitch
    0

    Search Helpers and translating older code

    I need a more experienced pair of eyes on something.

    I've had plenty of trouble figuring out how to display a multiple-entry search form with its results list using Umbraco 8.15. In working on this, I've found what looks like a great example that clarified a number of points for me. I translated it from Umbraco 7 but I still can't get it to work, due to a couple lines in the Search Helper that I can't figure out.

    The example is here: https://www.intuwebdesign.com/blogs/umbraco-7/umbraco-7-submitting-forms/

    My questions are about the SearchHelper classes. Specifically, UmbracoAssignedContentHelper and PageContentForIEnumerableIPublishedContent aren't recognized by Intellisense or Google. They're probably names for custom wrapper functions from other classes, but none of that information is referenced or explained in the post. I couldn't find anything from the rest of that site, either.

    I'm very new to Umbraco and can't get enough from the surrounding code to guess the types or namespaces that the lines might refer to, and therefore can't begin to look for the Umbraco 8 equivalents. I imagine the .First() and .GetPropertyValue() functions give some clues, but they don't narrow it down enough for me. Does anyone know how to translate and get this code working?

    PS: Additionally, what's the usual practice on custom Helper classes like this? Do they count as controllers and go in that folder/namespace?

  • George Phillipson 108 posts 287 karma points
    Oct 28, 2021 @ 16:03
    George Phillipson
    0

    Hi kjmitch

    Try this link, much simpler example

    https://www.intuwebdesign.com/blogs/umbraco-cms/examine-multiple-fields-search-and-or/

    Regards George

Please Sign in or register to post replies

Write your reply to:

Draft