XF 2.2 Views on articles, can we add this?

Sportsoutlaw

Active member
I'm trying out the different article view formats, and in the two options other than standard, page views do not show up, only replies. The folks writing articles prefer the optional formats, but they would like for the views to show as well. Any way this can be added?
 
I just did an edit to post_article_macros template

Find this bit

Code:
 <li><xf:avatar user="{$thread.User}" size="xxs" defaultname="{$thread.username}"/></li>
                <li class="articlePreview-by">{{ phrase('by_user_x', {'name':$username}) }}</li>

Add this after:

Code:
 <li><dl class="pairs pairs--justified structItem-minor">
                <dt>{{ phrase('views') }}</dt>
                <dd>{{ $thread.discussion_type == 'redirect' ? '&ndash;' : ($thread.view_count > $thread.reply_count ? $thread.view_count|number_short : number_short($thread.reply_count+1)) }}</dd>
            </dl></li>

Old thread but it's the third one so far asking for this! Somebody needs to make a suggestion - it should indeed be in the core .
 
Last edited:
Top Bottom