0

I've added the "rate" module to my project. I've added multiple axes to rate but they display below my node content. How would I be able to style this? I know how to create a custom .tpl file for my content type but the module adds code AFTER my template. How I can fix this?

  • It really depends on what you are trying to style. Do you want them to look a certain way, or be included in your template somewhere. You may be able to get away with some clever CSS, or you might want to investigate some hooks to modify the content. If you give me more information, I can give more details as to how to solve the problem. – Daniel Yule Apr 5 '12 at 20:29
  • Well after reviewing the rate module. It includes an "emotion.tpl.php" file for the type of widget that am using. So am thinking if I add the code from THAT file into my 'node--business.tpl.php' file I would then be able to theme it right? – Digital fire Apr 5 '12 at 20:52
0

Best answer on how to theme 3rd party modules is always to check their local documentation first, as most of the top-tier modules have very specific hooks, documentation, guidance for how you can theme their results. In the case of the Rate module, check the README.txt file for some guidance on what theme variables are able to be used in your node templates.

It looks like the best answer would then be to make a copy of the rate template into your theme folder and add your styling there:

* rate-widget.tpl.php
  This is the default template for all custom widgets.
* rate-widget--NAME.tpl.php
  This is a widget specific template. Use the machine name for NAME. Replace
  underscores by dashes in this name. This template is only available for custom
  widgets.

This does depend on exactly what it is your trying to theme in the emotion widget.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.