1:找到首页对应的HTML源代码:Areas\CMS\Themes\M1\Views\Home,发现有菜单加载的代码
@model  List<Maticsoft.Model.SNS.Categories>
@{
    //ViewBag.Title = "热卖购-专业社会化分享导购社区,淘宝客网站,SNS社区,动软社会化电商方案";
    Layout = "~/Areas/SNS/Themes/M1/Views/Shared/_BaseLayOut.cshtml";
}

2:顺藤摸瓜,再找到_BaseLayOut.cshtml,找到核心代码:@Html.Action("Navigation", "Partial", new { Theme="M1" })@*导航*@,得到关键词“Navigation

3:在网站应用层项目搜索关键词“Navigation”,得到:

  public PartialViewResult Navigation()
        {
            List<MainMenus> menusByArea = new MainMenus().GetMenusByArea(Maticsoft.Model.Ms.EnumHelper.AreaType.SNS, MvcApplication.ThemeName);
            return this.PartialView("_Navigation", menusByArea);
        }
4:在数据访问层找到对应的基本表 SA_WebMenuConfig 
  public DataSet GetList(string strWhere)
        {
            StringBuilder builder = new StringBuilder();
            builder.Append("select MenuID,MenuName,NavURL,MenuTitle,MenuType,Target,IsUsed,Sequence,Visible,NavArea,URLType,NavTheme ");
            builder.Append(" FROM SA_WebMenuConfig ");
            if (strWhere.Trim() != "")
            {
                builder.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(builder.ToString());
        }
5:直接从SQLSERVER 里面执行查询: SELECT  *  FROM SA_WebMenuConfig where NavTheme='M1',得到所有的菜单:


6:在系统后台-》网站管理-》导航菜单管理,如果你想新建菜单,执行以下操作即可:

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐