Skip to content

danielnorlin/EPi.Libraries.BlockSearch

 
 

Repository files navigation

Add block content to the index of EPiServer Search.

Build status GitHub version Semver ![Platform](https://img.shields.io/badge/platform-.NET 4.5-blue.svg?style=flat) Platform NuGet GitHub license
Issue Count Dependency Status Stories in Backlog

About

Add Blocks used on a page to EPiServer Search Index as content of the page they were used on. This is supported in Find, but not if you use EPiServer Search. You need an extra property to your base class, or a specific pagetype to hold the content of the Blocks. Note the ScaffoldColumn(false) attribute, which hides it in edit mode. [CultureSpecific] [ScaffoldColumn(false)] [Searchable] [AdditionalSearchContent] public virtual string SearchText { get; set; } The aggregated content from string properties marked Searchable in the Blocks are added to the property marked with [AdditionalSearchContent]. Note: If for some reason you don't want a property on a Block indexed, just add [Seachable(false)] to it. The content of the property marked with ```[AdditionalSearchContent]`` is added to the index and you get results also if the term you are looking for is only used in a Block on the page.

Powered by ReSharper image

About

Add block content to the index

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 73.3%
  • Smalltalk 26.7%