By Jorge Bodas Mier on Friday, 14 December 2012
Posted in General Issues
Replies 8
Likes 0
Views 1.6K
Votes 0
Hi I need to modify to display the first image of the post in the related post?
Thank you.
Hi!
How I can displays ONLY posts WITHOUT images?
I explain.

At first I display only posts with images, and then posts without images.



I tried code

if( $blog->getImage() ){}
else
{?>

<li id="entry_<?php echo $post->id; ?>">
<a href="<?php echo EasyBlogRouter::_('index.php?option=com_easyblog&view=entry&id='.$post->id); ?>"><?php echo $post->title; ?></a>
</li>



but it ignore, and displays all posts - with images and without.

Thanks.
·
Monday, 11 May 2015 05:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

I'm sorry but I don't get you. Can you explain what you are trying to do here? Please advise.
·
Monday, 11 May 2015 10:25
·
0 Likes
·
0 Votes
·
0 Comments
·
How to displays only related posts, that don't have images?
·
Monday, 11 May 2015 15:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Romagromov,

Perhaps you can try download the attachment below and place it inside your /modules/mod_easyblogrelatedpost/tmpl folder and see how it goes
·
Monday, 11 May 2015 17:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks, but I don't use module.
I'm talking about related posts in details blog view.
I mean blog.related.php file that displays related posts.
·
Monday, 11 May 2015 17:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Romagromov,

Ah I see. I was under the impression that you are using related post module
Here I attached the attachment and place it inside your /components/com_easyblog/themes/default . With this it will displays only related posts that don't have blog images.
·
Monday, 11 May 2015 17:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks!
I modified blog.related.php

First, it displays related posts with images, after it displays posts without images.

Looks not bad



Modified file attached. May be, somebody find this useful.
·
Monday, 11 May 2015 22:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Romagromov,

Thanks for the heads up on this. Glad that your issue has been resolved now
·
Tuesday, 12 May 2015 10:42
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post