TBDragon
Active member
hi 
i want to get the $resource.resource_id and use it in my own template with callback
the template will be shown in the RM (i use Widget Framework and place the template in hook:resource_view_sidebar_below_resource_controls ) where i need to pass the $resource.resource_id to the call back
like this
	
	
	
		
and this is my index.php
	
	
	
		
the code work fine without parameters for the method
				
			i want to get the $resource.resource_id and use it in my own template with callback
the template will be shown in the RM (i use Widget Framework and place the template in hook:resource_view_sidebar_below_resource_controls ) where i need to pass the $resource.resource_id to the call back
like this
		HTML:
	
	<xen:callback class="TBDragon_RMEpisodes_index" method="getRM" params="$resource.resource_id"></xen:callback>
	and this is my index.php
		PHP:
	
	public static function getRM ($resource_id){
$db = XenForo_Application::get('db');
//$resource_id = 1;
$resource_category_id = $db->fetchAll('
                                                Select resource_category_id
                                                from xf_resource
                                                where resource_id =  ?
                                                '
                                                , $resource_id);
var_dump($resource_category_id);
//$resource_category_id = '1';
$AllRresource = $db->fetchAll('
                                                Select resource_id,title
                                                from xf_resource
                                                where resource_category_id =  ?
                                                '
                                                ,$resource_category_id[0]);
var_dump($AllRresource);
print_r($AllRresource);
}
	the code work fine without parameters for the method


