XF 2.2 ❓ Add link to media gallery in postbit

Fullmoon

Member
Hello, hoping I can get a bit of help.

I've tried a number of combinations to add a link in the postbit that goes to each member's media albums.

I know there are links in the profile popup and on their profile page, but I want a link that's visible on the postbit like this:

xen photo.jpg

{{ link('media/users', $xf.visitor) }} Shows your own albums, how would I get the "see my photo albums" link to each individual member's?

Thanks for any help.
 
Last edited:
HTML:
{{ link('media/users', $user) }}

The above code should work. I linked the ratings in the post bit in Xons content ratings and used this and it worked fine. $xf.visitor gets the person currently viewing the page but $user will get anyone on the site that you click on. It does not need $xf in front of it. If I recall that was my first try and that didn't work but did with just $user.

Here's the code I used for Xons content ratings to link into an overlay in the post bit just for education. I went to the template message macros and found this.

HTML:
<dl class="pairs pairs--justified">
<dt>{{ phrase('reaction_score') }}</dt>

Below it I added this:

HTML:
<dd><a href="{{ link('members', $user) . 'ratings' }}" data-xf-click="overlay">{$user.reaction_score|number}</a></dd>
 
Last edited:
Top Bottom