fahad ashraf
Well-known member
Hello ,
I made a template function on listener and returning html from that function but it is showing as string not html below in my code
it is showing as please see below image
Anybody please help me to solve this issue
Thanks
I made a template function on listener and returning html from that function but it is showing as string not html below in my code
PHP:
public static function templaterSetup(Container $container, Templater &$templater) {
$templater->addFunction('star_rank', [__CLASS__, 'templaterFnStarRank']);
}
public static function templaterFnStarRank(
$templater, &$escape, \XF\Entity\User $user
)
{
return "<div></div>";
}
it is showing as please see below image
Anybody please help me to solve this issue
Thanks