콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3648 화면

for example.some snippet content in website should only visible for portal user only after login.other content should be public,and other should be only for admin user

아바타
취소
베스트 답변

Hi,

You could check the group of the user logged in in the snippet block. 

Eg:

<t t-snippet=“module_name.snippet_template_name”


    t-if=“request.env.user.has_group(‘base.group_portal’)” t-thumbnail=“thumbnail image link”/>


The above snippet block will only be available for portal user.

<t t-snippet=“module_name.snippet_template_name”


    t-if=“request.env.user.has_group(‘base.user_admin’)” t-thumbnail=“thumbnail image link”/>


The above snippet block will be available for admin user

Regards

아바타
취소
관련 게시물 답글 화면 활동
5
1월 22
11675
3
3월 15
4474
1
5월 24
2211
0
8월 23
2254
0
6월 20
2536