The fivestar widget is not being displayed in a custom made view because the appropriate javascript and css files are not being included in the page.

The following is an example of what is missing from my html page.

@import "/modules/modules/fivestar/fivestar.css";@import "/modules/modules/fivestar/widgets/minimal/minimal.css";

If I hardcode the script above into myfivestarview.tpl.php then the fivestar widget appears.

Comments

quicksketch’s picture

Could you post the code you're using in your custom templating of the view? The problem likely that you're circumventing the normal method for displaying a fivestar value.

The view should output something similar to theme('fivestar_static', $rating, $stars);, which will include the css automatically.

Or if you have reason for not using the theme function, you can call in the necessary fivestar css using fivestar_add_css()

quicksketch’s picture

Status: Active » Closed (fixed)