My goal has been to completely hide the updates block if no updates are available, but thinking more for consistency sake having the block always there isnt necessarily a bad thing. So now i am trying your suggestion, adding the check to the postbit_legacy template:
<if condition="$post[postcount] == '1'">
<li class="updates">
$template_hook[postbit_start]
$template_hook[postbit_messagearea_start]
<p class="update-date">$post[postdate]</p>
<p class="update-message">$post[message]</p>
<if condition="is_member_of($bbuserinfo, 6)"><a href="$post[editlink]" name="vB::QuickEdit::$post[postid]">Edit</a></if>
$template_hook[postbit_end]
</li>
<else />
<li class="no-updates">
$template_hook[postbit_start]
$template_hook[postbit_messagearea_start]
There are no updates for this template.
$template_hook[postbit_end]
</li>
</if>
Based on the above, you would expect that the updates block will always be there and if update posts exist, they are displayed, else show a message saying that no updates are available.
Unfortunately, what i've ended up with is just the updates heading on the page that doest have any updates (ie, no message saying no updates below the heading) and then on the page that does have updates i have the first update message displaying, but then the no updates messages outputted 3 times where the other updates should be.
I know that probably doesnt make sense, so i've attached two images - one showing the download that doesnt have any posts and one of the download that does have posts.
Thanks,
Chris
|