在 Plone 4 的集合视图中扩展表列
集合提供了一个选项来选择要在集合的表视图中显示的列。
我们使用 archetypes.schemaextender 通过两个字段扩展大多数内容类型:预告图像和预告文本。
是否有一种合理的方法来扩展可用表列的列表?
是否有一种方法可以在集合的表格视图中显示预告文本和预告图像,而无需进一步自定义?表视图的逻辑是否足够灵活以支持架构扩展?
Collections provide an option to select columns to be display within the table view of collection.
We are extending most content-types with two fields using archetypes.schemaextender: teaser image and teaser text.
Is there a sane way to extend the list of available table columns?
Is there a way to display the teaser text and teaser image inside the table view of the collection with out further customization? Is the logic of the table view flexible enough in order to support a schema extension?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在控制面板->集合(通常为 /portal_atct/atct_manageTopicIndex)您可以定义所需的每个元数据。集合取决于 Portal_catalog 元数据和索引,因此您必须在其中添加自定义字段。在模块配置文件中使用 GenericSetup 告诉 ZCatalog 创建新索引,或手动创建它们。在前一种情况下,请注意重新安装模块可能会清除新创建的索引( http ://maurits.vanrees.org/weblog/archive/2009/12/catalog)。
In the control panel -> collections ( typically /portal_atct/atct_manageTopicIndex) you can define every metadata you need. Collections depends on portal_catalog metadata and indexes, so you've to add your custom fields there. Use GenericSetup in your module profile to tell ZCatalog to create the new indexes, or create them by hand. In the former case, beware that reinstalling the module could wipe out the new created indexes ( http://maurits.vanrees.org/weblog/archive/2009/12/catalog ).
您可能想查看 collective.formcriteria。我还没有对它进行足够的完善,安装它可能会给你带来一些卸载麻烦,所以在没有先备份所有内容的情况下不要安装它。也就是说,它为您提供了足够的绳索来使用列表达式执行您想要的操作。当然,这也足够用来吊死自己了。
You might want to take a look at collective.formcriteria. I haven't polished it nearly enough and installing it can get you in some uninstall trouble so don't install it without first backing everything up. That said, it gives you more than enough rope to do what you want using column expressions. Of course this is also more than enough rope to hang yourself with.