xen:callback

Valhalla

Well-known member
Can I use the <xen:callback> tag to fetch some changeable data if I pass two parameters (user id, node id)? Something like below. I may be using xen:array incorrectly.

params="{xen:array 'userId={$visitor.user_id}','forumId={$forum.node_id}'}"

PHP:
public static function getStatus($params)
{
   $userId = $params['userId'];
   $forumId = $params['forumId'];

   // return something
}
 

TBDragon

Active member
I didn't use the callback tag. I passed what I needed through the viewParams variable.
is it possible to provide me some tips about this variable cuz i have to do something similar and pass many things and play with them in php
 

robart

Member
Is there any documentation on xen:array? I can't seem to find any. I'm also trying to do something along the lines of:

params="{xen:array 'userId={$visitor.user_id}','forumId={$forum.node_id}'}"

within a <xen:callback>
 
Top