diff --git a/framework/frontend/blog/modules/related.php b/framework/frontend/blog/modules/related.php index b1fdfa10..3b4c71d5 100644 --- a/framework/frontend/blog/modules/related.php +++ b/framework/frontend/blog/modules/related.php @@ -11,6 +11,7 @@ */ use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; +use Joomla\Registry\Registry; // No direct access. defined('_JEXEC') or die; @@ -25,16 +26,25 @@
images); $astroidArticle = new Astroid\Article($item, true); + // Post Format + $post_attribs = new Registry(json_decode($item->attribs)); + $post_format = $post_attribs->get('post_format', 'standard'); + $image = $astroidArticle->getImage(); ?>
image_intro)) { + echo ''; + } else if (is_string($image) && !empty($image)) { + echo '
'; + $document->include('blog.modules.image', ['image' => $image, 'title' => $item->title, 'item' => $item]); + echo '
'; + } else { + echo LayoutHelper::render('joomla.content.post_formats.post_' . $post_format, array('params' => $post_attribs, 'item' => $item)); + } ?> - - - -