Formatting News Results & Search Results
I'm either missing something ridiculously easy, or there are (more) bugs in Sitefinity.
I have a template. Ok.
I create a new page, and drop the search results widget onto the page in my content area. Ok.
I configure the Search Results to use my index. Ok.
Publish!
When I hit the search, and I'm redirected to the search results page, I see my search results. Great!
Now go to page 2. The template is lost - What?!
I see that in the url the "search-results/page/2?indexCatalogue..." is added, so that's fine, but how do I tell Sitefinity to inherit the template to the system-generated page that it came from?
The same is true for a news item. How do I configure Sitefinity to use a template for a system item? I've scoured documentation for about 5 hours now. I'm tired, and I need help.
Bump. Anybody? I need help here, please.
Hi Brenton,
I have tested the issue but I could not reproduce the problem you faced. The template is applied to all the pages of the search result. What I have tested:
- Create an search index (Administration > Search Indexes) and re-index.
- Create search result page and select the results template (test with custom and build-in templates).
- Create Search page, drop the Search widget and set the index to use, than set the Search result page.
- All the Result pages have one and the same layout and search templates.
What is the problematic template you have - Layout or Search template? Are they custom ones?
Regards,
Svetoslav Manchev
Telerik
Take a look here! Repro all day long. The template is a custom template, that uses MVC widgets in the header & footer.
Use the search at the bottom of the page, and notice how it manually sends the user over to the search results page. Page one looks fine, page 2 + does not!
Above and beyond this issue, how do I specify a template for news items? Something is missing.
http://stage.manchester.edu
Hello Brenton,
In order to use MVC widget in automatic generated page, you need to override the "HandleUnknownAction" method in your controller. More information could be found here, for example:
protected override void HandleUnknownAction(string actionName)
var model = new MvcWidgetModel();
model.Message = "MVC - <
strong
>unknown</
strong
> action!";
View("Default", model).ExecuteResult(this.ControllerContext);