如何在Plone中使页脚自动显示主菜单中的项目? [英] How to make footer to show items from main menu automatically in Plone?

查看:82
本文介绍了如何在Plone中使页脚自动显示主菜单中的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我工作的研究所中将Plone 4.1.4与Doormat和Diazo一起使用,并且页脚必须通过添加内部连接到主菜单项的每个列和项来手动制作.

I am using Plone 4.1.4 with Doormat and Diazo in an institute I work and the Footer has to be made manually by adding each column and item that links internally to items from main menu.

我想要的是此页脚这是站点地图,每次用户从主菜单(内容文件夹).

What I want is that this footer, which is the site map, to change automatically every-time some user create, edite or delete an item from the main menu (content folders).

当我得到这份工作时,我发现页脚中的许多链接都已过期,并且由于该研究所各部门的许多用户都可以更改结构,所以我知道他们不会同时更新这两个结构文件夹和页脚.

When I got the job I noticed many of those links in footer are out of date, and as there are many users in their each sections of the institute that are allowed to change the structure, I know they won't update both folders and footer.

我在互联网上搜索了一些产品或提示,但找不到能解决该问题的任何东西.

I searched the Internet for some product or tip but I cant' find anything that resolves that problem.

推荐答案

如果您的Diazo主题是使用mr.bob或zopeskel作为Python包创建的,则您可能已经有了z3c.jbot,可以轻松覆盖模板,可用的.如果是这样,则包中可能有一个template_overrides或类似目录.如果是这样,只需将名为plone.app.layout.viewlets.footer.pt的文件放入其中,内容如下:

If your Diazo theme was created as a Python package using mr.bob or zopeskel, you probably already have z3c.jbot, which allows you to easily override templates, available. If so, you likely have a template_overrides or similar directory in the package. If so, just drop into it a file named plone.app.layout.viewlets.footer.pt with the contents:

<div i18n:domain="plone"
 id="portal-footer">

<ul id="portal-doormat"
    class="navTreeLevel0 visualNoMarker">
    <tal:sitemap replace="structure context/@@sitemap/createSiteMap" />
</ul>

</div>

然后离开风格!

或者,您也可以通过命名文件plone.app.layout.viewlets.colophon.pt来替换该colophon.

Alternatively, you may replace the colophon by naming the file plone.app.layout.viewlets.colophon.pt.

如果您没有为主题使用Python包(如果Diazo主题是通过网络创建的),则可以使用ZMI中的portal_view_customizations工具进行相同的模板覆盖.

If you aren't using a Python package for your theme (if the Diazo theme was created through-the-web) then you may use the portal_view_customizations tool in the ZMI to make the same template override.

您可能还希望自定义站点地图的深度.可以通过portal_properties工具navtree_properties属性表进行更改.或者,只需使用CSS隐藏不必要的深度即可.

You may wish to also customize the depth of the site map. That may be changed via the portal_properties tool, navtree_properties property sheet. Or, just use CSS to hide unwanted depth.

这篇关于如何在Plone中使页脚自动显示主菜单中的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆