我使用schema接口创建了一个新的dexterity内容类型(名为Report)。此外,我还定义了一个具有模板report_view.pt的自定义视图。
我需要一些来自原始/默认模板的内容,以便在我的自定义模板中使用。在哪里可以找到用于dexterity内容类型的默认视图模板的代码?
发布于 2021-01-19 00:53:22
https://github.com/plone/plone.dexterity/blob/master/plone/dexterity/browser/configure.zcml
Dexterity内容的默认视图使用WidgetsView并以显示模式呈现所有小部件。
browser/configure.zcml中的标准视图定义引用了相关的页面模板:
<browser:page
for="..interfaces.IDexterityContent"
name="view"
class=".view.DefaultView"
template="item.pt"
permission="zope2.View"
/>此外,plone.app.dexterity包使用以下内容覆盖容器内容类型的默认视图:
<browser:page
for="plone.dexterity.interfaces.IDexterityContainer"
name="view"
class="plone.dexterity.browser.view.DefaultView"
template="container.pt"
permission="zope2.View"
/>https://stackoverflow.com/questions/45264442
复制相似问题