1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Post Problem

Discussion in 'XenForo Development Discussions' started by ScottLott, Mar 31, 2014.

  1. ScottLott

    ScottLott Member

    Hey Guys,
    I'm trying to get a thread to display inside a page node.

    So far I've go this code:
    class scootloot_ShowBlogStyle
        public static function 
    showThreadsinPage(XenForo_ControllerPublic_Abstract $controllerXenForo_ControllerResponse_Abstract &$response)
    $threadToRender 14;

    $visitor XenForo_Visitor::getInstance();
    $request = new Zend_Controller_Request_Http();
    $responseForum = new Zend_Controller_Response_Http();
    $routeMatch = new XenForo_RouteMatch();

    $controllerThread = new XenForo_ControllerPublic_Thread($request$responseForum$routeMatch);
    $controllerResponse $controllerThread->{'actionIndex'}();
    $controllerResponse->params['visitor'] = $visitor->toArray();

    $threadList = new XenForo_Template_Public('thread_view'$controllerResponse->params);

    $response->params['displayThreads'] = $threadList;

    I'm using a PHP callback on the page node and using <xen:raw> to get the template to load, and it's SO close to working.

    There's just one snag, the contents or "message" of each post aren't showing up, at all.

    I var dumped the "$post" variable (which is what the template uses to render the thread posts) and saw that the messages are actually there, the view controller just isn't rendering them into the template.

    Any ideas?
  2. ScottLott

    ScottLott Member

    Nevermind, I ended up just using XenPorta and modifying the layout to fit my needs.
  3. Luis

    Luis Well-Known Member

Share This Page