Reputation: 1837
I have a module in which I created a custom page with controller and some logic. Works fine. I need that page to function as home page for my site. I found some topics about implementing IHomePageProvider, but that seems to be impossible because I can't find the definition of IHomePageProvider in the Orchard core. So I know there are some topics on this subject, but I didn't manage to find a solution that way, so therefore this question.
Upvotes: 0
Views: 2757
Reputation: 3277
When working with Orchard Core (Orchard 2) there is setting with Home Route, which you can specify.
You can set it in your recipe.json file:
{
"name": "settings",
"HomeRoute": {
"Action": "Index",
"Controller": "ControllerName",
"Area": "AreaName"
}
}
or probablly later:
RouteValueDictionary newHomeRouteValue = ...;
var site = await _siteService.GetSiteSettingsAsync();
site.HomeRoute = newHomeRouteValue;
await _siteService.UpdateSiteSettingsAsync(site);
Upvotes: 1
Reputation: 2674
You can define a home Route and Controller associated with this route. Take a look how it's accomplished in the CulturePicker module: HomeRoutes and LocalizableHomeController
Upvotes: 0
Reputation: 17814
That is because it was removed at the same time as the routable part. This is now done using Alias.
Upvotes: 1