Wutime
Well-known member
Hi,
Help is appreciated. I'm augmenting posts from the Thread Controller, but realize for Articles, the first "post" is skipped.
Can someone shed light on how to retrieve the Article entry from the Thread Controller so I can modify that "post" similar to the Thread posts?
I'm extending the Thread controller as follows, and then iterating through the posts:
I'd like to grab the corresponding Article (or extend that controller if needed), to massage that text also.
Cheers and thank you.
Help is appreciated. I'm augmenting posts from the Thread Controller, but realize for Articles, the first "post" is skipped.
Can someone shed light on how to retrieve the Article entry from the Thread Controller so I can modify that "post" similar to the Thread posts?
I'm extending the Thread controller as follows, and then iterating through the posts:
Code:
namespace My\Addon\XF\Pub\Controller;
use XF\Mvc\ParameterBag;
use XF\Mvc\Reply\View;
class Thread extends XFCP_Thread
{
public function actionIndex(ParameterBag $params)
{
foreach ($prms as $prm => $value) {
if ($prm == 'posts') {
$post->message .= "add something or whatever";
}
}
}
I'd like to grab the corresponding Article (or extend that controller if needed), to massage that text also.
Cheers and thank you.
Last edited: