Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在 CompositeC1 中自定义 Layout.Navigation.Menu 函数,或者用我可以编辑的函数复制这个函数?我需要为渲染的元素添加唯一的 ID,这样我就可以创建基于图像的菜单,而不仅仅是文本。
该功能可以使用 XSLT 或 Razor 实现,具体取决于您最初选择的起始站点。检查下面的“Functions | XSLT Functions | ...”,如果你没有找到 Layout.Navigation.Menu,那么检查下面的“Layout | /App_Data/Razor/...”。
要复制 Razor 函数,只需复制文件,将其命名为您希望为新函数命名的名称。XSLT Functions 没有复制功能,这里您需要创建一个新的 XSLT FUnction 并复制设置。