Extending table columns in collection view in Plone 4

对着背影说爱祢 提交于 2019-12-04 07:27:17

问题


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?


回答1:


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.




回答2:


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 ).



来源:https://stackoverflow.com/questions/5455250/extending-table-columns-in-collection-view-in-plone-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!