Hi,
Been a few years since I've had to post here asking for help! I'm trying to show the user avatar in a latest blog posts template. I have the following but for whatever reason [[+createdby:userinfo=`photo`] just isn't working.
<li>
<article class="item">
<figure><img src="http://fakeimg.pl/365x250/222/FFF/?text=img+placeholder"></figure>
<div>
<span class="avatar">[[+createdby:userinfo=`photo`]]</span>
<div class="meta-data">
<span class="author">by [[+createdby:userinfo=`fullname`]]</span>
<span class="date">[[+createdon:ago]]</span>
</div>
<h3>[[+pagetitle]]</h3>
<p>[[+introtext]]... <a href="[[~[[+id]]]]">Read more</a></p>
</div>
</article>
</li>
I can confirm that the avatar is showing in the dashboard for this user (default admin). Any ideas?
Thanks,
LK
-
☆ A M B ☆
- 24,524 Posts
The Gravatar image in the Manager's menu bar is loaded remotely from the Gravatar site. You might be interested in these
http://modx.com/extras/package/gravatar?version=4d556cb4b2b083396d000d8a
http://www.sepiariver.ca/blog/modx-web/modx-snippet-to-get-user-profiles-and-gravatar/
This looks really nice, from the sepiariver package
<img src="[[+email:gravatarUrl]]" alt="gravatar">
Where [[+email]] is a valid email address the above will generate the gravatar URL for the img src attribute.