I want to call XSLTsearch macro inside razor code.
The reason is:
I want to make the search results based on the culture
so, it should be something Like that:
@if (Culture == "en-US")
{
<form>
<umbraco:Macro runat="server" Alias="XSLTsearch"
// setting some parameters "not based on the condition"
// This Parameters based on condition result
searchFields="titleText_en, bodyText_en"
previewFields="titleText_en, bodyText_en">
</umbraco:Macro>
</form>
}
else
{
<form>
<umbraco:Macro runat="server" Alias="XSLTsearch"
// setting some parameters "not based on the condition"
// This Parameters based on condition result
searchFields="titleText, bodyText"
previewFields="titleText, bodyText">
</umbraco:Macro>
</form>
}
You may be able to just change them in the XSLTseach macro itself... e.g., the culture is usually determined by the topnode in the "current" site, so XSLTsearch can easily search only pages in the current language/site.
Invoke XSLTsearch Macro inside Razor code
Hi,
I want to call XSLTsearch macro inside razor code.
The reason is:
I want to make the search results based on the culture
so, it should be something Like that:
-
Thanks in advance!
Hi TENNO,
What are the specifics you want to change?
You may be able to just change them in the XSLTseach macro itself... e.g., the culture is usually determined by the topnode in the "current" site, so XSLTsearch can easily search only pages in the current language/site.
/Chriztian
is working on a reply...