85 Posts
kromoadv
5 years ago
Topic

Hi Sebloders,

i have a company site with a list of users. Some of these users should be listed in a menu voice (MENU A), others in another menu voice (MENU B) and some of them in both menu voices (MENU A & B).

Each user has two different profiles (PROFILE A and PROFILE B) depending on the menu voice.

I'd like to store all profile informations in just one user content type and retrieve the right profile depending on witch list the user belong to.

Any suggestion please?

Should i set up two search lists?

Should i use a tag field or an additional custom category field to display same users in two different lists?

How can i retrieve the right user profile in each list?

Thanks in advance

Get a VIP membership
4229 Posts
Kadministrator
5 years ago
5
Level 1

You can easily create 2 different lsits for the same content type. You can search by tags as you suggested yourself or you can create a multiselect dropdown with options A and B, then search by this field.

85 Posts
kromoadv
5 years ago
4
Level 2

Hi Klass, thank you.

Of course i can create 2 lists for the same content type and search by tags or a custom multiselect field.

But the main issue for me is that some of those users have to be listed in both search lists but with link to different profiles.

The goal is to have just one user content type with profile A (for menu A) and profile B (menu B)

Example:

Menu A

  • User 1
  • User 2
  • User 3
  • User 4

Menu B

  • User 2
  • User 4
  • User 5
  • User 6

User 2 it's listed in both Menu A and Menu B.

In Menu A i click on User 2 to have Profile A.

In Menu B i click on User 2 to have Profile B.

Is that possible with Seblod?

Any suggestion?

Thanks in advance.

4229 Posts
Kadministrator
5 years ago
3
Level 3

You can hide fields according to various criteria using restriction plugins, in this case you could use url variable restriction to show/hide fields depending on the Itemid coming from menu, this way you can display different fields when user is retrieved trough different menu

85 Posts
kromoadv
5 years ago
0
Level 4

Hi Klas,

I was just looking for a restriction plug-in.

I didn’t know that url variable restriction was included in Seblod core starting 3.8 release.

I’ll give it a try and let you know.

Thank you so much.

Luca

85 Posts
kromoadv
5 years ago
1
Level 4

Hi Klas,

can i have multiple values for Itemid in url variable restriction?

E.g. Itemid is equal/in 124, 129

Thank you

4229 Posts
Kadministrator
5 years ago
0
Level 5

Yes, values can be specified as comma separated string. 

P.S. faster way to get an answer to such questions is to try :)

85 Posts
kromoadv
5 years ago
0
Level 1

Hi Klas,

it worked at the end.

Thank you so much.

Solved

Get a VIP membership