Thread:Project:Support desk/Getting article content using Title ?/reply (2)

Hello there,

Thanks for giving me the direction to start. Yes you are right, I am editing the NewestPages.page.php file

I have created a new function to retrieve the content and it works fine page_title); if (!$titleText) return ' Could not retrieve this Article Page. ';		$page = $titleText->getFullText; $article = new Article( $titleText ); $articleText = $article->getContent; $limit = 100; if (strlen($articleText) > $limit) { $words = str_word_count($articleText, 2); $pos = array_keys($words); $articleText = html_cutArticle($articleText, $limit). ' ' . ' ' . '(Read more)'; // return the changed text return $articleText. " ";	} else { echo " "; return $articleText. " ";		} ?>

and also added the $wgOut->addHTML( $this->showArticleText( $row) ); in the execute function.

Right now, I am trying to implement a "Read More" function if the article is > 100 words. However, I tried to do the above but it is giving me TitlePage instead. I can't even click on that.

I am guessing because no parser function was used? How should I implement that? Or are there any other methods to implement it?

Really appreciate your assistance and time!! Have a good day!