By Mist on Monday, 01 December 2014
Posted in General Issues
Likes 0
Views 591
Votes 0
Hi guys, i am trying to output the main image for author recent posts inside "author.info.php" template file.

I tried to do it this way

<img src="<?php if($aitem->image!=""){ echo $aitem->getImage()->getSource( 'frontpage' ); } ?>">


but it's not working ... i get errors

So, any idea why this code does not output the recent posts main image src ?

<?php echo $aitem->getImage()->getSource( 'frontpage' ); ?>


Any fix or workaround it ? Thanks a lot !
Hello,

Can you try the attached file instead? If it doesn't work, you can provide us your backend and FTP so we can check the error for you.
·
Tuesday, 02 December 2014 23:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mist,

May I know what errors did you get? You can provide us your backend and FTP access, the file path that you are modifying and also the page that display it. Please advise.
·
Tuesday, 02 December 2014 00:56
·
0 Likes
·
0 Votes
·
0 Comments
·
I attached the template file that creates trouble: author.info.php
# see line 65 on the attached file

If i am using inside the img data-src the code below to output the main image for author's recent items

<?php echo $aitem->getImage()->getSource( 'frontpage' ); ?>


... the page throws out "white-page" error (i think it's related to $aitem variable and getImage method)

If i remove this particular line ... everything works perfect.
·
Tuesday, 02 December 2014 19:05
·
0 Likes
·
0 Votes
·
0 Comments
·
WORKS PERFECT ! Thanks a lot Nik !
·
Tuesday, 02 December 2014 23:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mist,

Glad to heard your issues resolved.
·
Wednesday, 03 December 2014 01:04
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post