I have this problem. I created the "Topic" action with the parameter "topic" but when I go to "About / Topic? topic = aloha" I can not find this action and I get an error: "Page not found No umbraco document matches the url '/ About / Topic? Topic = aloha'. "
Controller:
public class AboutController : Umbraco.Web.Mvc.RenderMvcController
{
// GET: About
public ActionResult About(RenderModel model)
{
return View("About", model);
}
public ActionResult Topic( string topic)
{
return View("About");
}
}
Routing:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "Default1",
url: "{controller}/{action}/{topic}",
defaults: new { controller = "About", action = "Topic", topic = UrlParameter.Optional }
);
}