komentify / meteor-comments-ui

Simple templates for comment functionality in your Meteor App
MIT License
76 stars 40 forks source link

Template Customisation #57

Closed ritchieng closed 8 years ago

ritchieng commented 8 years ago

Hi,

I'm having issues making amendments to the template. Thanks in advance for helping.

I'm trying to integrate star-rating (https://atmospherejs.com/barbatus/stars-rating).

I added the custom template as a parameter.

{{> commentsBox id=post._id boxTemplate="myComments" }}

Then proceeded to make a myComments template with the stars-rating package included but the comments system would stop working. Am I suppose to copy the whole template from a file from commentsBox.html then modify it? I tried it and it didn't work also, do I've to create an accompanying myComments js file and map the original code over?

matteodem commented 8 years ago

Can you show me how you structured your template?

ritchieng commented 8 years ago

I simply did

<template name="myComments">
    {{> starsRating id='rating' star='\\f005' class='awesome' mutable=true}}
</template>

My intention is simple, I just wanted users to be able to rate with stars using the package when they comment. Thanks!

matteodem commented 8 years ago

The template you're adding replaces the whole commentBox, as it says in the parameter: boxTemplate. For now you need to copy the html for the comment box and replace the single comment templates with your own.

matteodem commented 8 years ago

see #42