Drupal 7手动接入FiveStar模块
continue
am trying to override the output of my page so I can add some PHP code, but the FiveStar module only give 2 options which is below or above Content. this is causing me problems as I'd like to include it in my HIDE technique, then I can choose where to place it.
e.g. (I hide all my output before rendering Content, then later I can render each as I choose, I cannot find the render for FiveStar Widget)
hide($content['comments']);
hide($content['links']);
hide($content['field_location']);
hide($content['body']);
hide($content['field_filename']);
hide($content['fivestar_widget']);
print render($content);
If any one can fill in the blanks for me would be awesome!
t.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果将小部件放置在
之后,则必须使用
在 $content 渲染之前。否则只需使用
。如果是在之前,则 print 属性将设置为 true 并且只会渲染一次。
If you place the widget after
<?php print render($content) ?>
you will have to use<?php hide($content['fivestar_widget_vote']); ?>
before $content is rendered. Otherwise just use<?php print render($content['fivestar_widget_vote']); ?>
. If it is before then the printed property will be set to true and it will only be rendered once.