主题 CCK 字段集
我正在尝试使用 CCK theme_fieldgroup_fieldset($elements) 挂钩将字段集转换为两列布局。
我认为这应该不难,因为各个字段都在 $elements 变量中,所以我所要做的就是迭代它们并单独打印它们。问题是我无法判断它们是否已被排除在内容类型的“显示字段”选项卡上的显示之外。
有人对我有什么想法吗?我是否试图以困难的方式做到这一点,或者我错过了什么?
I am attempting to use the CCK theme_fieldgroup_fieldset($elements) hook to convert the fieldset to a two column layout.
I thought that this shouldn't be to hard because the individual fields are in the $elements variable so all I have to do is iterate over them and print them individually. the problem is that I have no way to tell if they have been excluded from display on the "Display Fields" tab of the content type.
Does anyone have any ideas for me? Am I trying to do this the hard way or what am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是我想出的解决方案。最大的问题是它需要对每个字段进行数据库查询。这些不是最好的,但它确实有效,所以你能说什么?
Following is the solution that I came up with. The biggest problem is that it requires a database query for every field. These isn't the greatest, but it works so what can you say?