Joomla:将文章intro_image加载到文章页面中的模块中

时间:2018-07-17 15:37:33

标签: joomla joomla3.0

我正在寻找一种将当前正在读取的文章的intro_image加载到模块而不是文章组件中的方法。

对于其他项目,例如标题和发布日期,我可以做到这一点;

<h1>
<?php
    $input = JFactory::getApplication()->input;
    $id = $input->getInt('id');  
    $article = JTable::getInstance('content');
    $article->load($id);
    $article_title = $article->get('title'); 
    echo $article_title;
    echo "<br />";
    echo "<br />";
    $article_date = $article->get('publish_up'); 
    echo "<small>" . JHtml::_('date', $article_date, 'F d, Y') . "</small>" ;  

    ?>
</h1>

但是不能对图像做同样的事情。 也许是因为网址的存储方式?

[string] images = "{"image_intro":"images\/samplefolder\/sampleimage.jpg","float_intro":"","image_intro_alt":"","image_intro_caption":"","image..." (Length = 236)

0 个答案:

没有答案
相关问题