Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3333 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
5
ian. 22
11269
3
mar. 15
4216
1
mai 24
1858
0
aug. 23
1896
0
iun. 20
2323