Copied to clipboard

Flag this post as spam?

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


  • Luke 8 posts 78 karma points
    1 week ago
    Luke
    0

    Shared content inside Block List Editor into the Examine index

    We have a few customers whose site we've now built upon Umbraco v8 and the new Block List Editor. To give them as much freedom over how to structure a page as possible. This is great and works really well. However lately we found out that if we place shared content inside one of these editors (Say we have a reuable content block in data -> blocks that we then link inside the block list editor) the actual content that a user sees, doesn't end up in the Examine index for searching.

    I know this is because the entire Block List Editor is saved as a JSON string, so it only sees the GUID of the item linked and not the actual content result. I'm not entirely sure how this used to work with the Grid Layout editor, but I believe we had some sort of HTML output of that in the index.

    I have a handler hooked up to the DocumentWriting event of Examine already, to boost some search values and such. In there I have tried to get the HTML result of the block list editor to insert for indexing and searching, however I am running into multiple problems.

    1. The event gets fired before the content is actually available on the page, so getting the html via a HttpClient will either return a 404 for a new page, or old content for an existing item.
    2. The HttpContext is null, so running it through some hoops via a generated ControllerContext is not possible either.
    3. Instantiating your own HttpContext based on a fake Http call will result in Umbraco Helpers being null
    4. Trying to get the HtmlHelper from somewhere won't work either for the same reason as above.

    Has anyone else ran into this problem with the new Block List Editor and the searchability of the content inside and how have you been able to solve this?

    Thanks in advance,

    Luke

  • Søren Kottal 565 posts 3719 karma points MVP 3x c-trib
    1 week ago
Please Sign in or register to post replies

Write your reply to:

Draft