开发者

Drupal 7 manual access to FiveStar module

开发者 https://www.devze.com 2023-03-17 17:19 出处:网络
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

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开发者_StackOverflow中文版_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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号