I installed the Answers module and I am trying to edit the question_answer view. Basically I would like the answers (which are generated by the 'node content' display) to appear below the question. This is done by default by the module: See Picture.

The problem is that I would like to move 'Post an Answer' link before the list of answers. Now it works as follows
- Question Header
---List of Answers
---- Question Footer

and I would like to change it to
- Question Header
---- Question Footer (or just the entire Question node)
----List of Answers.

I know that's because the display is "Node Content", but I don't know how to do it properly. I've tried with Attachement, Blocks and no success. You can find the screenshot of the view settings here (Default view has the same values as Node Content Display) enter image description here Any advice greatly appreciated.

| improve this question | | | | |

Have you tried playing with the "Row style" setting ? You could change it to "Fields" and select the node:title, node:body, node:nid and node:answers (?? does that exist ?? I'm guessing that answers are just comments, right ? In that case, node:comments).

Output them in the order that you want, but rewrite the node:nid as a link to the "post answer" url. I don't know this module, but say the answer url is node/xxx/answer, you can rewrite the node:nid field as

<a href="/node/[nid]/answer">Post your answer</a>
| improve this answer | | | | |

My guess is that the post an answer link is just an add comment button. Since the view is outputting pure node display you should be able to edit the template file and move the $links to anywhere in the HTML.

| improve this answer | | | | |
  • Well, not really. What I would like to achieve is to output the answers as an attachement to the question node, not as its content. – Vonder Nov 3 '11 at 11:20

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.