Copied to clipboard

Flag this post as spam?

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

  • Tom Cowling 144 posts 342 karma points
    May 21, 2015 @ 18:49
    Tom Cowling


    Well done- this is a brilliant little search tool!

    I have a couple of questions / tweaks though:

    1. Is there any way to change the number of characters displayed in the preamble

    2. If the preamble field selected is a rich text editor, can the results render html?


    I changed the display characters manually in the CS file, but not sure where to start with rendering the preamble as html encoded.



  • Dennis Adolfi 1075 posts 6430 karma points MVP 3x c-trib
    Feb 26, 2016 @ 13:48
    Dennis Adolfi
    1. Not as a backoffice configuration, (maybe in a future update), but you can change it from 50 to whichever number you like in the AddToResultViewListIfValid method, in /App_Code/SimplisticController.cs Line 100.

      Description = node.UmbracoPropertyValue(this.SearchResultView.DisplayPreamble).AsSubString(50) ?? node.UmbracoPropertyValue(this.SearchResultView.AlternativePreamble).AsSubString(50),

    2. Yes, if you change the view in /Views/Partials/SimplisticSearchResultView.cshtml Line 20 to:

      @Html.Raw(node.Description ?? "")

    So happy that you liked it, sorry for the (extremly) slow anwser. :)

  • Tom Cowling 144 posts 342 karma points
    Mar 21, 2016 @ 12:09
    Tom Cowling

    Perfect. Thanks a lot Dennis.

Please Sign in or register to post replies

Write your reply to: