{%if content > ''%}
<div class"...">{{content}}</div>
{%endif%}
$content = $this->contentService->getByCode('user_info');
return $this->view('tempate',[
'user_info'=>$content
]);
public function getByCode(string $code):string{
if(!$user = $this->userService->getAuthUser()){
return 'for guest';
}
if($user->getGroup()==='retail'){
return 'for retail';
}
return 'other';
}