Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Vakarian96 Posted April 22, 2022 Posted April 22, 2022 Hello, what is the link to the cover photo of a user? I want to show the cover photo of the user in the post sidebar. For this I changed the "postContainer" template a little bit and added the following code. <div class="coverphoto" style="background-image: url(LINK_TO_COVER)"></div> Unfortunately I don't know exactly how to get the link of the respective cover photo. Can anyone help me with this? So far I have everything ready, it just hangs on the link. I tried it with "{$coverPhoto->file->url}" and "{$member->coverPhoto->file->url}", but it didn't work. Best Regards, Vakarian96
Mark H Posted April 22, 2022 Posted April 22, 2022 As this is a customization, with which we unfortunately cannot assist, I've moved it to the Community Support area where other community members may be able to answer the question.
Sonya* Posted April 22, 2022 Posted April 22, 2022 {{$coverPhoto = $member->coverPhoto();}} <div class="coverphoto" style="background-image: url('{$coverPhoto->file->url}')"></div>
Vakarian96 Posted April 22, 2022 Author Posted April 22, 2022 6 minutes ago, Sonya* said: {{$coverPhoto = $member->coverPhoto();}} <div class="coverphoto" style="background-image: url('{$coverPhoto->file->url}')"></div> Thanks for the answer, unfortunately it does not work. 😞
Sonya* Posted April 22, 2022 Posted April 22, 2022 {{$coverPhoto = $comment->author()->coverPhoto();}} <div class="coverphoto" style="background-image: url('{$coverPhoto->file->url}')"></div> Mark H 1
Vakarian96 Posted April 22, 2022 Author Posted April 22, 2022 1 minute ago, Sonya* said: {{$coverPhoto = $comment->author()->coverPhoto();}} <div class="coverphoto" style="background-image: url('{$coverPhoto->file->url}')"></div> Awesome, danke das war es.
Sonya* Posted April 22, 2022 Posted April 22, 2022 20 minutes ago, Vakarian96 said: danke das war es. Bitte schön 😉
Recommended Posts