SaaS CMS has officially launched! Learn more now.

Index block content when used in XhtmlString


I want the block content to be included in a page's SearchText property when dragged into an XhtmlString property on that page. 

Now the name of the block instance is added to page's SearchText instead of the content of that block instance.

How can I achieve it?

N.B. I am using [IndexInContentAreas] attribute for those blocks that I want to be included in a page's SearchText property when used in ContentAreas and that is working correctly!

Mar 10, 2021 7:05

One easy way would be to add a public property to your model then write some code to load the items XHtmlString property and any blocks returning a string of exactly the content. This would then be pushed to find and could be used for the search text.

Edited, Mar 10, 2021 16:53
Mar 10, 2021 16:55
Tomas Hensrud Gulla - Mar 10, 2021 19:57
I use this approach! :-)
Robert Tellvik - Mar 11, 2021 9:47
I tried it out and it works!
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.