I was actually able to get this working, here's my code:
PHP:
<?php
/*
* This file is part of a XenForo add-on.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Pages;
/**
* Static methods for the Providers page.
*/
class Providers
{
/**
* @param \XF\Pub\Controller\AbstractController $controller
* @param \XF\Mvc\Reply\AbstractReply &$reply
*/
public static function getData(
\XF\Pub\Controller\AbstractController $controller,
\XF\Mvc\Reply\AbstractReply &$reply
) {
$active = 1;
if ($reply instanceof \XF\Mvc\Reply\View) {
$finder = \XF::finder('XF:Thread');
$thread = $finder->where('thread_id', $active)->fetchOne();
$firstPost = \XF::app()->finder('XF:Post')->where('post_id', $thread['first_post_id'])->fetchOne();
$viewParams = [
'title' => $thread['title'],
'message' => $firstPost['message']
];
$reply->setParams($viewParams);
}
}
}
And in the nodes, I created a page and using the php callback provided within the page node I have:
Pages\Providers
as my class and
getData
as my method.
Now that you have all that set up, you can simply change
$active
to whatever thread you would like to display within the page. You can use variables such as {$message} within the body of your page to actually display the message (or w/e it may be).