Thread:Project:Support desk/Recent Articles in Mediawiki - getting the content

Hi folks,

I am trying to implement a recent article function on mediawiki and am using the newest page extension to do so. (https://www.mediawiki.org/wiki/Extension:Newest_Pages). Currently, I am retrieving the top 3 recently created article by using the format { {Special:Newestpages/-/3} } and is showing me the article title link.

But I will also like to get the content from the above 3 titles. Below is a code that I have modified in the php file. The bold one are the 2 lines of code I have added in to get the content. However, it is echo-ing out. How should I make it display on the main page??

Thanks for all advises!!!!

function makeListItem( $row ) { global $wgUser; $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); '$article = new Article( Title::newFromText( $title ) ) ; echo $article->getContent;' if( !is_null( $title ) ) { $skin = $wgUser->getSkin; $link = $row->page_is_redirect ? ' ' . $skin->makeKnownLinkObj( $title ). ' '					: $skin->makeKnownLinkObj( $title ); return( "{$link}\n" ); } else { return( "\n" ); }	}