Fork me on GitHub
Current release is 2.1.6 (21 Nov 2014).

Users who have not yet upgraded to 2.1 should get security release 2.0.18.14 (1 Nov 2014). We will stop providing these security releases to 2.0 at the end of this year.

CountDiscussions, CountBookmarks, CountDrafts, and CountNotifications Don't work.

edited April 2012 in Vanilla 2.0 Help

I'm still trying to get used to Smarty so bear with me but I have the following code in my 'default.master.tpl'...

{if $User.SignedIn}
    <li>
    <a href="{link path="messages/inbox"}">Inbox
    {if $User.CountUnreadConversations} <span>{$User.CountUnreadConversations}</span>{/if}</a>
    </li>
    <li>
    <a href="{link path="profile"}">Your Profile (<em>{$User.Name}</em>)
    {if $User.CountNotifications > 0}<span>{$User.CountNotifications}</span>{/if}</a>
    </li>
    <li>
    <a href="{link path="discussions/mine"}">Your Discussions
    {if $User.CountDiscussions > 0}<span>{$User.CountDiscussions}</span>{/if}</a>
    </li>
    <li>
    <a href="{link path="discussions/bookmarked"}">Bookmarks
    {if $User.CountBookmarks > 0}<span>{$User.CountBookmarks}</span>{/if}</a>
    </li>
    <li>
    <a href="{link path="drafts"}">Drafts
    {if $User.CountDrafts > 0} <span>{$User.CountDrafts}</span>{/if}</a>
    </li>
    {if CheckPermission('Garden.Settings.Manage')}
    <li><a href="{link path="dashboard/settings"}">Dashboard</a></li>
    {/if}
{/if}

But it doesn't seem to show the number in the header? I am testing this out so I made sure I had bookmarks, drafts etc. Which DO show up in the normal discussions tabs.

Is {$User.CountDiscussions}, {$User.CountBookmarks}, {$User.CountNotifications}, etc. not the right way to do it?

Answers

Sign In or Register to comment.