电子表格的 Drupal 内容类型字段
我正在开发一个出租房屋列表网站,其中“出租房屋”是一种带有 CCK 字段的内容类型。
我想添加一个名为“维护日志”的新字段,该字段只有管理员才能访问,并将用于跟踪在房屋上完成的所有维护工作;它具有电子表格所具有的一些功能。
我已经尝试过 SheetNode &表类型,但我遇到了问题。谁能建议一个更好的替代方案来实现这一点?
I am working on a Rental Home Listing website, where "Rental Home" is a content type with CCK fields.
I want to add a new field called 'Maintenance Log', which will be accessible only to the administrators and will be used to keep track of all maintenance work done on a home; it would have some functionalities a spreadsheet has.
I have already tried SheetNode & table types, but I ran into issues. Can anyone suggest a better alternative to implement this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用 CCK 附带的 node_reference 模块,因此您所要做的就是启用它。
然后,您将为维护日志创建一个新的内容类型,向其中添加一个可以引用“Rental Home”类型节点的 node_reference 字段。
当有人对房屋进行维护工作时,他们只需创建一个新的维护日志并使用参考字段来引用相关房屋。
然后您可以使用视图等以合适的方式显示它们。
如果您愿意,可以使用内容访问模块来处理谁可以查看维护日志。您还应该查看 CCK 附带的内容权限模块,它允许您指定对特定 CCK 字段而不是整个内容类型的访问权限。
I would recommend using the node_reference module which ships with CCK so all you have to do is enable it.
you would then create a new content type for maintenance logs, add a node_reference field to it that can reference nodes of type "Rental Home".
when someone has performed maintenance work on a home they would simply create a new maintenance log and use the reference field to reference the house in question.
then you can display these in a suitable way, using Views or the like.
if you'd like you can use the content access module to handle who can view the maintencene logs. you should also look at the content permissions module which also ships with CCK, it will allow you to specify access to specific CCK fields instead of the entire content type.