简体   繁体   English

Umbraco宏-在所有节点中显示内容

[英]Umbraco macro - Displaying content in all nodes

I have a navigation bar in which all links are grabbed from Umbraco items (entered by the user). 我有一个导航栏,其中所有链接都是从Umbraco项中抓取的(由用户输入)。 This navigation bar needs to be displayed on all pages. 该导航栏需要显示在所有页面上。 I tried inserting the items into the master template, but the links are not passed down to slave nodes. 我尝试将项目插入主模板,但是链接没有传递到从属节点。 So, I'm assuming I need some sort of a macro which grabs the content and displays on all pages. 因此,我假设我需要某种宏来抓取内容并显示在所有页面上。

Does anyone have any suggestions? 有没有人有什么建议?

I answered a question about creating a multi-level XSLT navigation menu a while back: 不久前,我回答了一个有关创建多级XSLT导航菜单的问题:

Create multilevel menu for umbraco using XSLT? 使用XSLT为umbraco创建多级菜单吗?

Perhaps that will get you going? 也许那会让你前进?

I think the key is that you need to get to the top of the content tree (home), then build the navigation. 我认为关键是您需要到达内容树(主页)的顶部,然后构建导航。 Otherwise the nav will be based on where in the tree the current page is. 否则,导航将基于当前页面在树中的位置。

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

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