0

I have a vocabulary(lessons) with terms as math,art,chemistry etc..

These terms are on user page in my lesson field. For example: My Lessons: Math,Geography,Art

Scenario: I'm gonna use linked field with different destination. When I click math term on user page It will goes to view page with path ../teacher/math to list all related teachers. Views page is ok no problem. But I can't get term name or id on user page. No available tokens. Terms new linked destionation as teacher/[my_lessons:term:name]

I've tried

  • teacher/[my_lessons:term:name]
  • teacher/[my_lessons:term:tid]

  • teacher/[my_lessons:name]

  • teacher/[current-page:user:field-my-lessons:tid]

  • teacher/[current-page:user:field-my-lessons:name]

None of them work.

teacher/[current-page:user:field-my-lessons] gets all term name.

How can I get users lessons term name or id ?

  • teacher/[current-page:user:field-my-lessons] gets all term name. assuming there are multiple entries for that field that makes sense - what would you expect to happen instead? How would the system know which term you want it to show? – Clive Jan 2 at 13:55
  • For example: Math id :185 . It should get math id then it should go url(domain.com/ theacher/185) when I click math on user profile page.. Or it should go domain.com/teacher/math to list teachers if I use term name on views contextual filter ..ID or name doens't matter. It's ok which one of them works. This scenario works on node types with any taxonomy... Because I can get term name with [node:field-my-lessons:name] . But I can't get individual term name or id on user pages. – iberx Jan 2 at 14:03
  • You can create view block of users in which display a field "lessons" with contexual filter "User: User ID"(Provide default value:user id from logged in user),Rewrite(Output this field as a custom link) your lession Field with teacher/{{ field_your_field__target_id }},then place the block on /user/* ,i think its a simple way to do the same – user52318 Jan 2 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.