XF 1.5 Extend XF Threads with data from RM

Robert9

Well-known member
When i watch a thread page, i have e.g. $resource and $thread to show in my templates.
When i try to extend threads

Code:
    public function actionIndex()
    {
        $res = parent::actionIndex();
        ...
        
        echo "<pre>";
        print_r($res->params);
        echo "</pre>";

I have $threads in $res->params to work with

When i try
list($resource, $category) = $this->_getResourceViewInfo();

i got errors from other addons.

What i need to do to get $resource here, please?
 
I can do:

$resourceModel = $this->getModelFromCache('XenResource_Model_Resource');
$resource = $this->_getResourceModel()->getResourceById($rid);

while i have $rid = the resource_id connected to this thread.

This means i do extra queries now?
 
Back
Top Bottom