display threads on page element like forum list

localhost8080

Well-known member
Hello.

I've setup a page element with a callback class.

There, I do a custom sql to search for threads.

I have a threadIds array with all threads I need. Also I have the threads in memory by using

Code:
$threads = $threadModel->getThreadsByIds(
            $threadIds,
            array(
                'join' =>
                    XenForo_Model_Thread::FETCH_FORUM |
                    XenForo_Model_Thread::FETCH_USER,
                'permissionCombinationId' => $visitor['permission_combination_id']
            )
        );

Now, I want to display them like a forum list.

Someone can tell me what to do now?

Thank you and best regards.
 
Do you mean you want to display them like the thread list template/view?

If so, copy the HTML into your page node content, ensuring the required variables are passed to it from your callback.
 
yes. I have this:

Code:
<xen:set var="$threads"><xen:callback class="My_ThreadHelper" method="getThreads" /></xen:set>
{xen:helper dump, $threads}
<br /><center>

<div class="discussionList section sectionMain">
    <xen:include template="thread_list" />
</div>

if I vardump the return value within my callback method, I got the right content.

with

Code:
{xen:helper dump, $threads}

I got

string(5) "Array"

and I got some errors because "$threads" is not an array but a string with the word "Array"
 
Top Bottom