I try to create various tabs for my nodes, which show a specific field and the comments of the users according to their roles :

enter image description here

I would like that these tabs are pages, and not in Javascript tabs.

I tried with Views, I created a view of comments, I manage to create pages, to have comments according to the roles, but not to add the desired field (what must be normal because it is about a view of comments and not about contents) :

enter image description here

I could can possibly serve me as templates, with templates suggestions, create a template by page, but I do not know how in the template to display comments according to the roles of the users...

Would you know a solution?

  • comments according to roles what does that mean? – CodeNext Oct 15 '16 at 9:20
  • Sorry for my bad English. For example, in the page "comments users role 1", to show only the comments of the users having the role 1, in the page "comments users role 2", to show only the comments of the users having the role 2 etc. – Hgfdsoiu Oct 15 '16 at 9:25
  • 1
    Your question seems ambiguous here. Are you asking for a solution to the general problem or asking how to add a node field to a comment view? – Shawn Conn Oct 15 '16 at 16:03
  • For the general problem. I do not know what is the way forward to reach what I want – Hgfdsoiu Oct 15 '16 at 16:37
  • Can you add a screenshot from the views configuration you made for the pages? It must be possible to add a field as header. – Елин Й. Oct 15 '16 at 19:00
  1. You are almost there. You just have to have new display for each role. See below.

    The view.

  2. Set the path as below, per role per display:

Role per path. Menu/tab settings.

  1. It will appear as below in node page:

Tabs on node page. With comment open.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.