I'm in a process of extending CoreResultsWebPart - I'm trying to create something like "Who is Blogging" to show you most recent blogs from people.
Following properties will be changed - so that when used it will be set as default.
- XslLink (Done)
- Location (to only Local Search Results)
- Sorting
I'm unable to find how to setup Location. There is a property called Location which takes string. However I have tried with "LocalSearchResults" and I't doesn't work.
This is my code so far:
public class WhosBloggingWebPart : CoreResultsWebPart
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
base.UseLocationVisualization = false;
base.XslLink = @"/Style%20Library/XSL%20Style%20Sheets/WhosBloggingModule/WhosBloggingXSLT.xslt";
this.Location = "LocalSearchResults";
this.FixedQuery = "contenttype:post AND NOT Title:\"Welcome to your Blog!\" AND url:\"*/site/*\"";
this.QueryNumber = QueryId.Query2;
this.DefaultSort = ResultsView.Modified_Date;
}
}