Due to my needs I'm trying to create a view for showing the FAQ page so i need to be able to somehow shoe the "Question Details" section too, but as tried this field is not showing up in views. Am i missing something? Is this possible?

Comments

scottprive’s picture

subscribe.

lameei - I am not a FAQ developer, but I am familiar with this issue so I will try to answer.

FAQ is not a "views enabled" module. Views enabled modules usually advertise they "support Views". Currently, Views is not part of Drupal core and so it is OPTIONAL -- not all Drupal modules support Views. FAQ looks to be intended to use it's own node display and not Views.

(FYI - Views does not enable all modules to be queried by Views; the module has to be coded to the Views API. If you ever want to confirm for yourself if a module supports Views, and you do not see any documentation, just browse the module directory and see if it contains a 'views.inc' file.)

In case anyone asks, here is why you can use Views to get access to Question and Answer: these 2 fields are node.title and node.body. One of the things Views does is "Views enable" the standard Drupal Node table. Unfortunately, there is nowhere in Node table to put additional data, so the FAQ question details go elsewhere... and Views can not "see" that data.

It is possible to write PHP code that exposes FAQ Question Details to Views. However, it is not an easy task if you are not familiar with the Views API.

So your short term options are:
a) In Views, do not use "Row Style = Fields", and all of the node will display..
[I understand that Node Row Style makes theming the View a bit more problematic].

b) Simply do not use this field.

c) You could hack your view's theme to query the Drupal database directly. For example if your views-view- file has access to the Node ID of what you are displaying, then you can use that ID to SQL query the table which contains the FAQ question details

d) Use CCK and build your own FAQ content type. You should be able to replicate most of the functionality using CCK + Taxonomy. All CCK and Taxonomy fields can be displayed as fields from within Views.

stella’s picture

Category: support » feature

or e) write a patch to FAQ module to provide views integration

scottprive’s picture

Thanks. I actually meant to add "e", Stella. :-)

Unfortunately I have not had great success myself writing Views patches (for another module, anyways). That said, I'll take a look at a Views patch for FAQ (quite possibly this would be easier to patch than the other module I tried).

Do you have a timeframe or expectation for FAQ on D7? I know the answer would probably be sooner if you were getting more help, but I was wondering what your thoughts were.

Thanks!

stella’s picture

Status: Active » Fixed

Those fields are now exposed to Views, so if you do want to use views, you can.

lameei’s picture

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

stella’s picture

Released in 6.x-1.12.