1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Profile Post Comment Conditional

Discussion in 'Styling and Customization Questions' started by Amaury, Aug 20, 2015.

Tags:
  1. Amaury

    Amaury Well-Known Member

    For posts and profile posts, I have a View Likes link that instantly takes you to the likes overlay.

    Now that we've updated to 1.5, I'd like to do the same thing for profile post comments. I'm not seeing anything I can use for reference in the new profile_post_comment, but this is what I have in the profile_post template:

    Code:
                        <xen:if is="{$profilePost.likes}">
                            <a href="{xen:link 'profile-posts/likes', $profilePost}" class="item control OverlayTrigger">{xen:phrase khflare_view_likes, 'count={xen:number $profilePost.likes}'}</a>
                        </xen:if>
    Would adjusting it like so for comments be correct?

    Code:
                        <xen:if is="{$profilePostComment.likes}">
                            <a href="{xen:link 'profile-posts/likes', $profilePostComment}" class="item control OverlayTrigger">{xen:phrase khflare_view_likes, 'count={xen:number $profilePostComment.likes}'}</a>
                        </xen:if>
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Should be mostly the same but $comment and profile-posts/comments/likes instead of $profilePostComment and profile-posts/likes
     
    Amaury likes this.
  3. Amaury

    Amaury Well-Known Member

Share This Page