Drupal theme_table ...主题嵌套表的方法?
标题几乎解释了我想做的事情...我不喜欢使用嵌套表,所以相信我,我很不高兴,所以,所以,所以完全更喜欢其他东西...但是,这就是la vie...
本质上,我试图弄清楚如何利用 theme_table 函数创建嵌套表...我似乎找不到任何有关如何做到这一点的信息...
我的目标标记实现($data 是我构建表格的信息数组):
<table class="atb">
<tbody>
<tr class="action">
<table class="inner-atb">
<tr class="un"><td colspan="2">$data['name']</td></tr>
<tr class="data">
<td class="img">$data['image']</td>
<td class="untext">
<span class="untext-style">
<span class="untext">$data['text']</span>
<span class="separator"></span>
<span class="timestamp">$data['timestamp']</span>
</span>
</td>
</tr>
</table>
</tr>
</tbody>
</table>
Title pretty much explains what I want to do... I'm not a fan of using nested tables, so believe me, I'm unhappy and would so, so, so totally prefer something else... but, c'est la vie...
Essentially, I'm trying to figure out how to create a nested table utilizing the theme_table function... I can't seem to find any information on how to do that...
The markup I'm aiming to achieve ($data is the array of information that I'm building the table off of):
<table class="atb">
<tbody>
<tr class="action">
<table class="inner-atb">
<tr class="un"><td colspan="2">$data['name']</td></tr>
<tr class="data">
<td class="img">$data['image']</td>
<td class="untext">
<span class="untext-style">
<span class="untext">$data['text']</span>
<span class="separator"></span>
<span class="timestamp">$data['timestamp']</span>
</span>
</td>
</tr>
</table>
</tr>
</tbody>
</table>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要的信息可以在此处找到。
您需要做的就是像这样的免责声明,未经测试
我没有将所有的类和内容放入其中,但已经向您提供了如何操作的概述。如果失败,请检查提供的文档链接。
The info you need can be found here.
What you need to do would be something like this disclaimer, not tested
I didn't put all the classes and stuff in, but have given you an overview of how to do it. If things fail check the doc link provided.