Drupal:全视图提取预告片
如何将预告片与 node.tpl.php 中的其余内容分开,以将预告片文本包装在特殊标记中?
How can I split the teaser from the rest of the content in the node.tpl.php to wrap the teaser text in special markup?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以预处理主题变量来检索预告片并单独存储它,否则 Drupal 会在内部处理它并且不会给您选择。
这是代码: http://www.mydiary.digiprosoft.com/?p=244< /a> 和下面是该链接的重点内容。
在template.php中
在node.tpl.php中
You could preprocess the theme variables to retrieve the teaser and store it separately, otherwise Drupal handles it internally and won't give you a choice.
Here is the code: http://www.mydiary.digiprosoft.com/?p=244 and below are the highlights from that link.
In template.php
In node.tpl.php