Plone:灵巧内容类型默认 View 模板

标签 plone dexterity plone-4.x

我使用模式接口(interface)创建了一个新的灵巧内容类型(名为 Report)。我还定义了一个具有模板 report_view.pt 的自定义 View 。

我需要原始/默认模板中的一些内容以在我的自定义模板中使用。在哪里可以找到用于敏捷内容类型的默认 View 模板的代码?

最佳答案

https://github.com/plone/plone.dexterity/blob/master/plone/dexterity/browser/configure.zcml

Dexterity 内容的默认 View 使用 WidgetsView 并以显示模式呈现所有小部件。

browser/configure.zcml中的标准 View 定义引用了涉及的页面模板:

<browser:page
    for="..interfaces.IDexterityContent"
    name="view"
    class=".view.DefaultView"
    template="item.pt"
    permission="zope2.View"
    />

此外,plone.app.dexterity 包覆盖容器内容类型的默认 View :

<browser:page
    for="plone.dexterity.interfaces.IDexterityContainer"
    name="view"
    class="plone.dexterity.browser.view.DefaultView"
    template="container.pt"
    permission="zope2.View"
    />

关于Plone:灵巧内容类型默认 View 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45264442/

相关文章:

plone - 警告 : exceptions. key 错误 : u'Undefined namespace prefix: i18. '

plone - 如何知道结果大脑是基于原型(prototype)还是基于灵巧的对象?

plone - 重命名 Plone 站点

plone - 如何使用 Plone 5 为灵巧类型提供图标

workflow - 如何访问 Anonymous 的 review_history

plone - 防止用户将 BMP、TIFF 等图像上传到 Plone 中的 ImageField

Plone:通知用户删除他的帐户

adapter - Plone 人 4 : How to customize a method in Archetypes content types?

plone - Plone 搜索可以配置为查看 portlet 内容吗?

Plone - 关于在页面中存储图像和文件附件的位置的最佳实践?