• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to use a template for a $variable?


Well-known member
In a class I want to make the $message variable more beautiful, so I want to use a "custom_template" to style the variable. Template custom_template:
My code would be
$viewParams = array('message' = $message);
$message = XenForo_Template('custom_template', $viewParams);
Do you know how I could get the code working? The class is within event notice_fire, so I do not have access to any parent class. Thank you !