XF 2.1 How can I pass a value via callback?

grantus

Active member
I'm doing a callback in the member_view template:

Code:
<xf:callback class="\\ILL\\Controller\\Store" method="getHtml"></xf:callback>

I have my method:

Code:
public static function getHtml() {
// query
return \XF::app()->templater()->renderTemplate('public:store_view', $viewParams);
}

Everything works except that the only issue is I need the user_id to be passed to getHtml. Is that possible?
 
I don't know why the reply was removed from @K a M a L but it worked and it was so obvious:

Code:
<xf:callback class="\ILL\Controller\Store" method="getHtml">{$user.user_id}</xf:callback>
 
Top Bottom