Hi, I'm a total drupal newbie, trying to set up a community site for my family and close friends.
The faq module is very important for this project, but I am having one issue with itI am using drupal5 and the corresponding faq module. Categories are set to inline, with questions set to drop down when clicked on.
I am trying to accomplish pages with built in, separate faqs. IE, on the "donate" page, I want to have the faq category "donations" embedded within the page, using the same drop down style.
The category in url appears to be "www.example.com/?q=faq/15". The problem seems to be that the category does not appear as a node (not when categories are set to inline) and I heard there is a load_node function, but why learn the php involved when the category itself is not a node? (I do not know php).
So, is there a way to insert faq categories within a new page? How? Could you show me an example snippet, if possible, using category "donations" and "faq/15"?
I appreciate any help!

Comments

stella’s picture

Status: Active » Fixed

Add into your page node something like:

<?php
$output = faq_page(15);
print $output;
?>

Be sure to select the "PHP code" input filter format.

Cheers,
Stella

NancyDru’s picture

Title: Insertng faq or faq categores into a ew page? » Insertng faq or faq categores into a new page?

Wow, Stella, that's a really useful feature. Is it documented somewhere?

stella’s picture

Assigned: Unassigned » stella

No, it wasn't something I had previously thought of. I've added it to the documentation at FAQ: Frequently Asked Questions.

Cheers,
Stella

NancyDru’s picture

Yes, I saw it while I was making some handbook changes - looks good. Thanks.

alienseer23’s picture

you
are
a
rockstar

alienseer23’s picture

so, that seems to work beautifully! but, when the content is displayed, it is displayed with all questions and their answers inline, is there a way to get the 'collapsing' action (click on a question to reveal its answer) enabled in that output?

stella’s picture

Only if you set those options in the FAQ administration settings, there's no other way to do it I'm afraid.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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