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 343 karma points
    May 21, 2015 @ 18:49
    Tom Cowling
    1

    Tweaking

    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.

     

    Thanks!

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Feb 26, 2016 @ 13:48
    Dennis Adolfi
    100
    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 343 karma points
    Mar 21, 2016 @ 12:09
    Tom Cowling
    0

    Perfect. Thanks a lot Dennis.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies