Mark Handy
Mark Handy

Reputation: 1256

Kentico search results showing raw macros

I have a table with column headers coming from localization keys. The table code is in an Editable Text webpart. Unfortunatly, the macro is showing in search results. is there a way to avoid this, or limit the smart search webpart? Worst case is i drop the localization implementation.

Here's my code snippet:

	<thead>
		<tr>
			<th scope="col">{$kff.Generic-Name$}</th>
			<th class="type" scope="col">{$kff.Generic-Type$}</th>
		</tr>
	</thead>

Upvotes: 0

Views: 116

Answers (2)

JanH
JanH

Reputation: 11

You can call the CMS.MacroEngine.MacroResolver.Resolve(string contentResult) method within your smart search transformation to get those macros resolved into text (or resource strings).

Upvotes: 1

Roman Hutnyk
Roman Hutnyk

Reputation: 1549

So those macros are page content. You can control what you're showing in search result changing appropriate transformation. Also you might try to go to the appropriate page type search fields and change Content field.

Upvotes: 1

Related Questions