1

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.

apaderno
  • 28,547
  • 16
  • 75
  • 90
Purplemonkey
  • 1,927
  • 3
  • 27
  • 39

1 Answers1

1

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.

Adam S
  • 509
  • 10
  • 24
  • Mate I could kiss you! Thats exactly what I've been looking for, for days! could you go one step futher and point me in the direction of how I can find these variables. i.e. "fivestar_widget_vote", "links" etc... – Purplemonkey Jul 05 '11 at 10:57
  • Use the Devel module and you can use the dsm($vars) function to print the variables to the screen. I use the PhpED IDE which costs a couple of hundred dollars but really makes debugging and development a snap. – Adam S Jul 05 '11 at 18:35