By Mist on Thursday, 15 May 2014
Posted in Technical Issues
Replies 4
Likes 0
Views 596
Votes 0
Hi
I am trying to load frontpage main image inside dashboard.drafts.php template file, using the code below but for some reason it's not working

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


Any tips on what can cause the issue, or maybe the code is wrong ?

This code works on dashboard.entries.php file but for some reason does not work inside dashboard.drafts.php
Hello Mist,

Sorry but I really do not have the time to debug this right now as my hands are really full Just for your info, the draft table is not the same as the "blog" table so the output might not be the same.
·
Friday, 16 May 2014 01:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mist,

It's because probably the $entry object is not a valid table object. You can try this,


<?php
$blog = EasyBlogHelper::getTable('Blog');
$blog->bind($entry);

echo $blog->getImage()->getSource('frontpage');
·
Thursday, 15 May 2014 16:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Still now luck, i am getting the same white page error if i will try to output the image using your code. Same thing if i use the code i posted in my first post above.

It's strange that inside dashboard.entries.php everything it's working perfect. For some reason there is something wrong with dashboard.drafts.php
·
Thursday, 15 May 2014 16:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry but I can't provide you any further assistance as I do not know how the code actually looks like.
·
Tuesday, 24 June 2014 10:58
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post