Under the manage display for the user profile
/admin/config/people/accounts/display, I have 4 view modes as below:
- Profile (Machine name: user.profile)
- Company (Machine name: user.company)
- Activities (Machine name: user.activities)
and under each view mode, I have a set of fields.
I also have a menu with below items:
Now, I need when a user click on the menu item (Profile), to redirect him to the view mode: Profile and so on for other menu items.
So basically, the link for the menu item should be something like:
I was thinking something easy like:
/user/1#profile will direct the user of uid=1 to the view mode: Profile of his profile page.
/user/1#company will direct the user of uid=1 to the view mode: Company of his profile page.
/user/1#activities will direct the user of uid=1 to the view mode: Activities of his profile page.
How to switch between view modes using the url only ?
is that doable!? if no, any alternative way ?
UPDATE #1 (My requirement)
Say on the user profile page, I have the below fields (as an example):
And a simple menu with below items:
I want when a logged in user click on the menu item:
- Profile (to display for him only field_1 -> field_4)
- Company (to display for him only field_5 -> field_8)
- Activities (to display for him only field_9 -> field_12)