我有一个 Orchard CMS 应用程序。我想在主页之外创建多个页面。我想在其他页面上显示一个菜单。用户登录时,应根据其角色显示菜单。有人可以给我解决方案吗?
2 回答
You can create new pages in the admin Dashboard by choosing New --> Page in admin menu. Menu is static atm, so there's no out-of-the-box functionality to limit the menu items to the current user role(s). Btw - I'm building a module for this, though, so such a feature will be available in few weeks.
Cheers
To add a menu to "other than homepage" - You can add a layer with rule !url'/homepage' (that might not be exact.) Then you can assign a menu widget to that layer.
Now, getting a role based menu is a little tougher. Can you use roles in the layer rules? I haven't seen it but if it exists, you could create a layer for each role with the a rule like this. !url'/homepage' && role'foo'