问题
How can I create a navigation menu data type with submenu items so that I can create it in the back office with properties like text, href, optional image? Something like dropdown multiple.
I've installed Umbraco 7.1.5 with NuGet in VS2013 and using Razor syntax.
EDIT:
Is it possible to create an object of type menu and edit it in the back-end's UI, for a non-developer. The user should add as many items or sub items as needed with those properties, with a plus sign. I've found this property editor. Is this possible using this property editor?
回答1:
Create a Partial View (in the back-end under the SETTINGS section). If you create a new partial view, one of the pre-created snippets will be "navigation".
Then use some CSS menu (you e.g. created yourself or found on google), and try to match the navigation HTML to that of the CSS menu.
To include the partial view in the template just use
@Html.Partial("NameOfThePartialWithoutExtention")
来源:https://stackoverflow.com/questions/25445890/umbraco-7-create-menu-datatype-with-submenus