mike406
Member
Hi all. We've made a small template modification to show the # of post likes (if any exist) next to the Like/Unlike link for posts. Example image below.
What I would like to add so it's more fluid, is when someone goes to Like or Unlike the post that the number next to View Likes be dynamically updated plus or minus one accordingly. Is there by chance any elegant way I could do this in the post template to achieve this? Or am I just better off writing some jQuery/Javascript myself?
The current template code that shows View Likes: X is just this bit here.
Thank you for any input!
What I would like to add so it's more fluid, is when someone goes to Like or Unlike the post that the number next to View Likes be dynamically updated plus or minus one accordingly. Is there by chance any elegant way I could do this in the post template to achieve this? Or am I just better off writing some jQuery/Javascript myself?
The current template code that shows View Likes: X is just this bit here.
Code:
<xen:if is="{$post.likes}">
<a href="{xen:link 'posts/likes', $post}" class="item control">{xen:phrase khflare_view_likes, 'count={xen:number $post.likes}'}</a>
</xen:if>
Thank you for any input!