Admin Plugin Route Problem

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 anos atrás
It's not correct.

Submenu items  (e.g Blog -> Blog post) has correct link while the parent item (Blog) that by default don't have link, get the link of last visited view (http://localhost/Admin/Customer/List).

My version is 2.65.
11 anos atrás
koreano wrote:
It's not correct.

Submenu items  (e.g Blog -> Blog post) has correct link while the parent item (Blog) that by default don't have link, get the link of last visited view (http://localhost/Admin/Customer/List).

My version is 2.65.


Ok. Update the code to:

        if (!string.IsNullOrWhiteSpace(item.ControllerName) && 
            !string.IsNullOrWhiteSpace(item.ActionName))
        {
            item.RouteValues = new RouteValueDictionary() { { "area", "Admin" } };
        }


We only set the RouteValues only if there is controller and action defined. :D
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.