简体   繁体   English

在Asp.net MVC 3中显示Ektron子菜单?

[英]Displaying Ektron submenus in Asp.net MVC 3?

I'm new to Ektron, and I'm working on a project that has Ektron menus on several pages. 我是Ektron的新手,并且我正在一个项目,该项目在几页上都有Ektron菜单。 The menus are already displaying (someone else made the code for these). 菜单已经显示(其他人为此编写了代码)。 This is the code for the menu widget that is being used: 这是所使用的菜单小部件的代码:

@using NEHGS.ResourceEngine

@{

    var widgetModel = Model.UserControl as NEHGS.Models.NehgsSubNavigation; 

    //string clientID = Guid.NewGuid().ToString();


    ResourceEngine.Register("/widgets/NehgsSubNavigation.css");


}

@Html.Raw(widgetModel.NavigationMarkup)

Here is an example of one of the menus this displays: 这是显示的菜单之一的示例:

1个

In Ektron, Membership is a submenu item which contains 3 submenus, "Guest", "All", and "Information". 在Ektron中,“成员资格”是一个子菜单项,其中包含3个子菜单:“来宾”,“全部”和“信息”。 When I click on "Membership," I need its 3 submenus to display. 当我单击“会员资格”时,我需要显示其3个子菜单。 Being new to Ektron, I have no idea how to access those submenus. 作为Ektron的新手,我不知道如何访问这些子菜单。 If I know how to access them it will be easy enough for me to write code to make them display, but how to I retrieve them from the widgetModel? 如果我知道如何访问它们,那么我很容易编写代码以使其显示,但是如何从widgetModel检索它们呢?

I hate to break it to you, but that code is not from Ektron. 我不愿意将它透露给您,但是该代码并非来自Ektron。 My first guess would be that the developer working on it before you has created their own layer on top of Ektron's API. 我的第一个猜测是,开发人员必须在Ektron API之上创建自己的层之前对其进行处理。

You also mention you are using MVC? 您还提到您正在使用MVC? Ektron does not support MVC yet as it is an ASP.net WebForms application. Ektron尚不支持MVC,因为它是ASP.net WebForms应用程序。 I've heard of people creating MVC front ends to Ektron but it usually ends up being more trouble than its worth. 我听说有人为Ektron创建MVC前端,但通常最终会带来麻烦,而不是有价值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM