[英]Drupal: Create block with custom tpl and variables (render array)
In the tpl I want to: 在tpl中,我要:
print render($content['something']);
... instead of just print (render) the entire content all at once: ...而不仅仅是一次打印(呈现)全部内容:
print $content;
Now, I can make this work by implementing hook_theme, but I would love to just use the default block_ .tpl. 现在,我可以通过实现hook_theme来完成这项工作,但是我只想使用默认的block_ .tpl。 Am I doing something wrong? 难道我做错了什么?
In the .tpl you can do: 在.tpl中,您可以执行以下操作:
print render($elements['something']);
wee! e!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.