I’m trying to display the rating results where each entry has two rating categories - “Industry Relevance” and “Academic Relevance”.
When someone has rated either of these I want to show the rating.
When nobody has rated either of these, I want to display “no rating yet”.
My problem is that
{if no_results}No ratings yet{/if}
displays it’s message only when it’s embedded and the ratings results only display when they’re not embedded.
Here’s the code I’m using:
{exp:weblog:entries weblog="ig_articles" limit="1"}
<p>{igauthor} ({igyearauthored}). <u>{title}</u>. {igsource}.<br />
{embed="includes/ratings"}
<br /><br />
<strong>Industry Relevance Rating:</strong><br />
{exp:rating:stats entry_id="{entry_id}" theme="default" form_name = "industryrelevance"}
(5 stars meaning very relevant - 1 not relevant)<br />
{stars_overall_avg}Based on {overall_count} review{if overall_count != "1"}s{/if}
{if no_results}No ratings yet.{/if}
{/exp:rating:stats}
<br /><br />
<strong>Academic Relevance Rating:</strong><br />
{exp:rating:stats entry_id="{entry_id}" theme="default" form_name = "academicrelevance"}
(5 stars meaning very relevent - 1 not relevant)<br />
{stars_overall_avg}Based on {overall_count} review{if overall_count != "1"}s{/if}
{if no_results}No ratings yet.{/if}
{/exp:rating:stats}
<br /><br />
Comments: (how many) Implications: {if igimplications != ""}Yes{if:else}No{/if} Highlights: {if ighighlights != ""}Yes{if:else}No{/if}<br />
<p><a href="{title_permalink=article}">[More...]</a></p>
<hr />
{/exp:weblog:entries}
The URL below will take you to a page that displays the first Industry/Academic results as non-embedded, the second Industry/Academic results embedded:
http://www.investigaming.com/index.php/home/test/
