Vakarian96 Posted April 22, 2022 Share 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 Link to comment Share on other sites More sharing options...
Mark H Posted April 22, 2022 Share 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. Link to comment Share on other sites More sharing options...
Sonya* Posted April 22, 2022 Share Posted April 22, 2022 {{$coverPhoto = $member->coverPhoto();}} <div class="coverphoto" style="background-image: url('{$coverPhoto->file->url}')"></div> Link to comment Share on other sites More sharing options...
Vakarian96 Posted April 22, 2022 Author Share 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. 😞 Link to comment Share on other sites More sharing options...
Sonya* Posted April 22, 2022 Share Posted April 22, 2022 {{$coverPhoto = $comment->author()->coverPhoto();}} <div class="coverphoto" style="background-image: url('{$coverPhoto->file->url}')"></div> Mark H 1 Link to comment Share on other sites More sharing options...
Vakarian96 Posted April 22, 2022 Author Share 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. Link to comment Share on other sites More sharing options...
Sonya* Posted April 22, 2022 Share Posted April 22, 2022 20 minutes ago, Vakarian96 said: danke das war es. Bitte schön 😉 Link to comment Share on other sites More sharing options...
Recommended Posts