Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
TAMAN Posted March 6, 2016 Posted March 6, 2016 I have created a database and i have fully customized the look and everything but there is one big issue with record ratings okay for example here in this picture you can see the rating stars on each article image right?you can rate any article on the page, BUT no matter what article you going to rate, when you refresh the page it always saves for the first article on top, the featured one, for example you rated 2 stars for the last article on that page and when you refresh the page the rate is saved for the featured article on top :/ im sure the problem has something to do with this in my database index template i have customized, while i don't see any problem in the codes looks like if the rating system is opened on multiple articles in the same page it only saves for this " articles-post-first " div <div class="articles"> {{if count($articles)}} {{foreach $articles as $id => $record}} {{if $id == 0}} <div class="articles-post-first"> {template="entry" app="cms" location="database" group="esports" params="$record, $database, 0"} </div> {{else}} <div class="articles-post"> {template="entry" app="cms" location="database" group="esports" params="$record, $database, $id"} </div> {{endif}} {{endforeach}} {{endif}} </div> and here is the code of rating im using inside "entry" template {{if $record->container()->allow_rating}} <div class="blog-rating"> <span>{$record->rating()|raw}</span> </div> {{endif}} im guessing star rating system does not work if it is opened in multiple articles on a same page? any idea whats going on here?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.